Header Scroll Effect functionality

Header Scroll Effect functionality

$(window).bind(‘scroll’, function() {
if ($(window).scrollTop() > 20) {
$(‘.headerSec’).addClass(‘fixed’);
}
else if($(window).width() <= 800){
$('.headerSec').removeClass('fixed');
}
else if($(window).width() <= 768){
$('.headerSec').removeClass('fixed');
}
else if($(window).width() <= 600){
$('.headerSec').removeClass('fixed');
}
else if($(window).width() <= 510){
$('.headerSec').removeClass('fixed');
}
else if($(window).width() <= 480){
$('.headerSec').removeClass('fixed');
}
else if($(window).width() <= 320){
$('.headerSec').removeClass('fixed');
}
else {
$('.headerSec').removeClass('fixed');
}
});

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s