LorDex
LorDex

Reputation: 2636

JS to handle mouse wheel and scroll bar page scrolling with callback

As in topic - does anybody know any jQuery plugin or JS script to handle mouse wheel / scrollbar draggin' page scroll, that allows you to call any function after scrolling is done (callback)?

Nicescroll would seem to be really nice solution, except it does not provide any callbacks

Thanks.

Upvotes: 2

Views: 1927

Answers (2)

Nikes
Nikes

Reputation: 1094

or this one

http://james.padolsey.com/javascript/special-scroll-events-for-jquery/

(haven't tried it personally yet)

Upvotes: 1

sdespont
sdespont

Reputation: 14025

Just bind events to your page :

$(function() {
    $(window).bind('mousewheel', function(event, delta) {
        //Mouse wheel event callback
    });

    $(window).bind('scroll', function(event) {
        //Scroll event callback
    });
});

Mousewheel plugin http://brandonaaron.net/code/mousewheel/docs

Upvotes: 1

Related Questions