From: Sven Date: Thu, 4 May 2017 07:21:04 +0000 (+0200) Subject: Bug 11327 try again to fix flickering on scroll X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bac8d7eaec088fe72eb3d68031968d5899b07839;p=ipfire.org.git Bug 11327 try again to fix flickering on scroll --- diff --git a/static/js/site.js b/static/js/site.js index 23585c3c..e265921f 100644 --- a/static/js/site.js +++ b/static/js/site.js @@ -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){