I recently launched a new website that can be found here. The site includes the following JavaScript code:
$(document).ready(function(){
$(window).bind('scroll', function() {
var navHeight = $( window ).height() - 70;
if ($(window).scrollTop() > navHeight) {
$('.menu-2-section').addClass('smallheader');
}
else {
$('.menu-2-section').removeClass('smallheader');
}
});
});
In addition to the JavaScript, I have the following CSS code:
.smallheader {position: fixed; top: 0; z-index:150;}
I suspect there may be an issue with the code, but I can't quite figure out what it is. Can someone please lend me a hand with this? Thank you in advance for any assistance!