]> git.ipfire.org Git - ipfire.org.git/commitdiff
Bug 11327 try again to fix flickering on scroll
authorSven <sven.hoehn@posteo.de>
Thu, 4 May 2017 07:21:04 +0000 (09:21 +0200)
committerSven <sven.hoehn@posteo.de>
Thu, 4 May 2017 07:21:04 +0000 (09:21 +0200)
static/js/site.js

index 6c27e83b44b18ab733173a6f4072cb76a2cc3b9a..4d6edddb560ea4b47a2515d122bda3b7bec9589d 100644 (file)
@@ -1,4 +1,10 @@
 $(document).ready(function () {
+       $("#scrollto").click(function(e) {
+               e.preventDefault();
+           $('body').animate({
+               scrollTop: $("#features").offset().top -72
+           }, 1500);
+       });
     $(window).scroll(function () {
         if ($(document).scrollTop() > 100) {
             $(".fixed-top").addClass("scrolled");
@@ -8,12 +14,6 @@ $(document).ready(function () {
             $(".menu-text").removeClass("hidden");
         }
     });
-    
-    $("#scrollto").click(function() {
-           $('html, body').animate({
-               scrollTop: $("#features").offset().top -72
-           }, 1500, 'easeInOutExpo');
-       });
 });
 
 $.query = function(name){