]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/public/js/init.js
My implementation progress bar at the top of the page #1348
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / public / js / init.js
index 5e5ea8472af9de994e45bfe3b197b07afe6f59d0..dffeaaad29accb934d636178cf473607b5d02292 100755 (executable)
@@ -46,4 +46,11 @@ $(document).ready(function(){
         $(".nav-panels").css('background', 'transparent');
         return false;
     });
+    $(window).scroll(function () {
+        var s = $(window).scrollTop(),
+        d = $(document).height(),
+        c = $(window).height();
+        var scrollPercent = (s / (d-c)) * 100;
+        $(".progress .determinate").css('width', scrollPercent+'%');
+    });
 });