sridaran Posted April 30, 2013 Share Posted April 30, 2013 I am working in jQuery scroll function to make the header portion of webpage fixed and body portion scrollable. My code is working fine in chrome & firefox browsers. But the scroll is not working in IE8 browser. Can any one tell me that where I did mistake? Here is my script: <style type="text/css"> .nav{ z-index: 9999; position: fixed; left: 0; top: 0; width: 100%;}</style> <script>jQuery("document").ready(function($){var nav = $('.fixedhead');$(window).scroll(function () {if ($(window).scrollTop() > 0) {nav.addClass("nav");} else {nav.removeClass("nav");}});});</script> Link to comment Share on other sites More sharing options...
justsomeguy Posted April 30, 2013 Share Posted April 30, 2013 We would probably need to see an example of your site online or least the corresponding HTML and CSS code to be able to give any help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now