JavaScript
Article

jQuery Snippet Capture Horizontal Scroll

By Sam Deering

Just a jQuery Code Snippet to Capture Horizontal Scrolling.

//capture horizontal scroll
$(window).bind('scroll', function()
{
     //check if it's hit the leftmost scroll point
    if ($(document).scrollLeft() == 0)
    {
          //scroll horizontal
    }
});
  • alk

    Sighh… not even a demo on the page.

    • http://jquery4u.com/ jQuery4u

      Sorry about this mate, I have a really good horizontal scroll demo coming soon.

Recommended

Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in JavaScript, once a week, for free.