Reputation: 2077
In my project i need to grab some parameters related to scroll event on a page like start datetime, stop datetime, ycoords on start scrolling and ycoords on stop. I need to trap only the start and stop of the scroll events but i know that in JavaScript there isn't methods for this purpose. Any idea for doing it with all major browser compatibility?
Thanks in advance
Upvotes: 0
Views: 991
Reputation: 429
$(window).scroll($.debounce( 250, true, function(){
$('#scrollMsg').html('SCROLLING!');
}));
$(window).scroll($.debounce( 250, function(){
$('#scrollMsg').html('DONE!');
}));
Upvotes: 2