Floating/Fixed menu works but jumps when you scroll down
-
Hi,
I have added the below code to my footer.php in my theme for the header menu in my website.
<SCRIPT> $(document).ready(function() { var div = $('#header-wrap'); var start = $(div).offset().top; $.event.add(window, "scroll", function() { var p = $(window).scrollTop(); $(div).css('position',((p)>start) ? 'fixed' : 'static'); $(div).css('top',((p)>start) ? '0px' : ''); }); }); </SCRIPT>
However, when using IE, Google Chrome or Opera Browser, the floating fixed menu jumps when I scroll down from the top of the page.
It works good and doesn’t do the above in Firefox or Safari browsers.
Does anyone know how to fix this ??
Thank you,
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Floating/Fixed menu works but jumps when you scroll down’ is closed to new replies.