Home › Forums › JavaScript › issue with sticky navigation › Re: issue with sticky navigation
May 30, 2013 at 2:30 pm
#137087
sameera
Member
i found a solution.. Thanks for trying to help :)
$(window).scroll(function() {
var navheight = $(‘window’).height();
if ($(window).scrollTop() >= navheight) {
$(‘.site-navigation’).addClass(‘fixed’);
}
if ($(window).scrollTop() < navheight) {
$(‘.site-navigation’).removeClass(‘fixed’);
}
});