I make an online product site, I fire a scroll event, only 12 elements will be shown at launch, but when the eighth element scrolls to the top scroll, it should only fire once, but it fires every time I scroll down, please help. Here is my code:
var navigation_offset_top = $('.prods-list li:nth-child(4)').offset().top; $(window).on("scroll",function(){ var scroll_top = $(window).scrollTop();
source share