So I have a scroll event that fires when the user scrolls to a certain point on the site. It works until you hit that point and want to keep scrolling, then it will fire continuously with every single scroll. I want to fire ONE time and then just not fire anymore.
$(window).on('scroll', function() { var y_scroll_pos = window.pageYOffset; var scroll_pos_test = 450; // set to whatever you want it to be if(y_scroll_pos > scroll_pos_test) { alert("hey you hit it"); } }); I set up a demo below: