I want to show and hide a piece of code, if I scroll the page, for example, halfway, I tried to use window scrolling, but it doesnβt work (no errors, clean code, different browsers, different versions of jQuery), but it doesnβt start anything, so I looking for a better way to show and hide the div if I view the scroll.
used this to trigger an event (not working)
$(window).scroll(function(){
alert('works')
});
source
share