Reputation: 3399
I need a cross-browser way of binding to the scroll event for the browser's native scrollbar.
$("html, body") seems to work for firefox, while $(window) seems to work for IE.
Is there a better way to use the correct version rather than trial and error? I also would like to detect mobile scrolling, if possible.
Upvotes: 3
Views: 11409
Reputation: 76880
If $(window).scroll()
works with IE (and it works with firefox and Chrome too) i think you should use it
Upvotes: 9