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.
If
$(window).scroll()works with IE (and it works with firefox and Chrome too) i think you should use it