add the movie_list script
This commit is contained in:
11
movie_list/scroll-indicator.js
Normal file
11
movie_list/scroll-indicator.js
Normal file
@@ -0,0 +1,11 @@
|
||||
(function() {
|
||||
var si = document.querySelector(".scroll-indicator");
|
||||
var onscroll = function() {
|
||||
var max = document.body.scrollHeight - window.innerHeight;
|
||||
si.style.display = "block";
|
||||
si.style.width = (window.pageYOffset / max * 100) + "%";
|
||||
};
|
||||
|
||||
window.onscroll = onscroll;
|
||||
onscroll();
|
||||
})();
|
||||
Reference in New Issue
Block a user