jQuery .scroll() events for the body/window/html/document

11,388

If $(window).scroll() works with IE (and it works with firefox and Chrome too) i think you should use it

Share:
11,388
Radley Sustaire
Author by

Radley Sustaire

I'm a web developer specializing in WordPress theme and plugin development. I have more than 12 years of experience in the industry and own my own business, ZingMap, which all of my services revolve around WordPress. I often do freelance work for small business and contracts for agencies such as Alchemy + Aim. I am very familiar with popular plugins like WooCommerce, Advanced Custom Fields, Gravity Forms and much more. I'm very familiar with the database structure and managing queries within WordPress and do this sort of backend work on a daily basis.

Updated on June 04, 2022

Comments

  • Radley Sustaire
    Radley Sustaire almost 2 years

    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.