I recently implemented a script to modify a CSS property in my nav bar as I scroll down, triggering the change after reaching 100px.
$(window).scroll(function() {
var scroll = $(window).scrollTop();
//console.log(scroll);
if (scroll >= 100) {
//console.log('a');
$(".header").addClass("change");
} else {
//console.log('a');
$(".header").removeClass("change");
}
});
Is there a way for me to hide the navigation bar when scrolling reaches 1000px and then display it again after passing that point (1500px)?