fix error

This commit is contained in:
chiu 2021-09-02 15:12:09 +08:00
parent f139a4cc68
commit 4f5e240e1b
1 changed files with 8 additions and 4 deletions

View File

@ -799,8 +799,9 @@ function transdate(){
});
$('.modules-menu-level-1').css('left','-'+$('.outdropdowns .dropdowns').offset().left+'px');
$(".downIcon").click(function() {
$(".kenjohn").addClass('navFixed');
window.setTimeout(function(){
var move_to_target=function (m) {
$(".kenjohn").addClass('navFixed');
$('.layout-content').css('margin-top',$('.kenjohn').height());
var theTop;
if (parseInt($('.layout-content').css('margin-top')==0)){
theTop = $('.layout-content-inner.container').offset().top-$(".kenjohn").position().top+10;
@ -808,8 +809,11 @@ function transdate(){
theTop = $('.layout-content-inner.container').offset().top-$(".kenjohn").position().top-$(".kenjohn").height()+10;
}
$("html, body").animate({
scrollTop: theTop }, {duration: 500,easing: "swing"});
},100);
scrollTop: theTop - m }, {duration: 500,easing: "swing"},function(){
move_to_target(0);
});
}
move_to_target(50);
return false;
});