Zhuangpeiyue (Talk | contribs) |
Zhuangpeiyue (Talk | contribs) |
||
Line 28: | Line 28: | ||
break; | break; | ||
} | } | ||
− | if(bottom<150) | + | if(bottom<150){ |
− | if($('.container_in .container_nav').hasClass('fixed_2')) | + | if($('.container_in .container_nav').hasClass('fixed_2')){ |
$('.container_in .container_nav').addClass('fixed_2'); | $('.container_in .container_nav').addClass('fixed_2'); | ||
− | if(bottom>=150) | + | } |
− | if($('.container_in .container_nav').hasClass('fixed_2')) | + | } |
+ | if(bottom>=150){ | ||
+ | if($('.container_in .container_nav').hasClass('fixed_2')){ | ||
$('.container_in .container_nav').removeClass('fixed_2'); | $('.container_in .container_nav').removeClass('fixed_2'); | ||
+ | } | ||
+ | } | ||
if(!$('.container_in .container_nav').hasClass('fixed_2')){ | if(!$('.container_in .container_nav').hasClass('fixed_2')){ | ||
− | if(top>120) | + | if(top>120){ |
− | if(!$('.container_in .container_nav').hasClass('fixed')) | + | if(!$('.container_in .container_nav').hasClass('fixed')){ |
$('.container_in .container_nav').addClass('fixed'); | $('.container_in .container_nav').addClass('fixed'); | ||
− | if(top<=120) | + | } |
− | if($('.container_in .container_nav').hasClass('fixed')) | + | } |
+ | if(top<=120){ | ||
+ | if($('.container_in .container_nav').hasClass('fixed')){ | ||
$('.container_in .container_nav').removeClass('fixed'); | $('.container_in .container_nav').removeClass('fixed'); | ||
+ | } | ||
+ | } | ||
} | } | ||
}); | }); |
Revision as of 09:30, 28 September 2017