]> 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)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Apr 2018 10:12:40 +0000 (12:12 +0200)
static/js/site.js

index 23585c3c2d50ff0ef9a214773e1c12c5fb6608ba..e265921f55e5b5b4b8cc6cc561fe33844ff4424b 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){