javascript - Weird JS error when it comes to a sticky nav bar -
so have site can see here. have issue sticky nav bar, is, flickers when scroll bottom of page.
when js this, work not flicker:
<script> $(document).ready(function() { $('#nav-wrapper').height($("#nav").height()); $('#nav').affix({ offset: 675 }); }); </script> but nav bar jumps violently around. when nav bar this, not jump around, flicker...
<script> $(document).ready(function() { $('#nav-wrapper').height($("#nav").height()); $('#nav').affix({ offset: $('#nav').height() }); }); </script> obviously, want nav bar not flicker or jump. i'm checked code on firefox, chrome, , safari. please help me!
quick answer: assign same css properties applied #nav.affix #nav.affix-bottom ie in homegrown.css change
#nav.affix { position: fixed; top: 0; width: 100% } to
#nav.affix, #nav.affix-bottom { position: fixed; top: 0; width: 100% } explanation: of explanation in this post. based on testing noticed scrolling near end of page.. flickering happening b/c .affix-bottom beingness applied in bursts #nav div.. gave .affix-bottom same properties of .affix.. no abrupt alter happens div.. hope helps!
javascript html css
No comments:
Post a Comment