http://www.jqueryscript.net/menu/Fixed- ... -menu.html
I don't want it to "fade" I just want it to appear instantly.
Javascript is not my forte, so wonder if anyone can see how to adjust it to either fade by ms, or remove the fade so it just "appears" ?
Code: Select all
$(function(){
var menu = $('#menu'),
pos = menu.offset();
$(window).scroll(function(){
if($(this).scrollTop() > pos.top+menu.height() && menu.hasClass('default')){
menu.fadeOut('fast', function(){
$(this).removeClass('default').addClass('fixed').fadeIn('fast');
});
} else if($(this).scrollTop() <= pos.top && menu.hasClass('fixed')){
menu.fadeOut('fast', function(){
$(this).removeClass('fixed').addClass('default').fadeIn('fast');
});
}
});
});