From 929b449b3eb0b500af41be0f68af76068423a894 Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 2 Sep 2021 13:28:12 +0800 Subject: [PATCH] fix downIcon --- assets/javascripts/app.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index 02ddd68..4f9ab65 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -799,9 +799,13 @@ function transdate(){ }); $('.modules-menu-level-1').css('left','-'+$('.outdropdowns .dropdowns').offset().left+'px'); $(".downIcon").click(function() { - var theTop = $('.layout-content-inner.container').offset().top-$(".kenjohn").position().top-$(".kenjohn").height()+10; - $("html, body").animate({ - scrollTop: theTop }, {duration: 500,easing: "swing"}); + $(".kenjohn").addClass('navFixed'); + $('.layout-content').css('margin-top',$('.kenjohn').height()); + window.setTimeout(function(){ + var theTop = $('.layout-content-inner.container').offset().top-$(".kenjohn").position().top-$(".kenjohn").height()+10; + $("html, body").animate({ + scrollTop: theTop }, {duration: 500,easing: "swing"}); + },10); return false; });