i need to add class after 1070 i have the code for that and its work great:
jQuery( document ).ready(function( $ ) {
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= 1070) {
$(".header-main").addClass("extrablack");
} else {
$(".header-main").removeClass("extrablack");
}
});
});
now i need to add class extrablack in 1070 but remove in 1580 how can i do that? I need the class stay between 1070 and 1580 of website. thanks
if (scroll >= 1070 && scroll < 1580)then add class else remove it (important the else part)