Louis93
Louis93

Reputation: 3923

Why am I unable to delegate handlers to this scroll event?

$(document).on('scroll','.archives_container',function(){
    console.log("Hello World");
})

However, scrolling through the .archives_container div doesn't seem to set off the handler. Why is this?

JsFiddle here: http://jsfiddle.net/VRP8t/

Upvotes: 0

Views: 37

Answers (1)

A. Wolff
A. Wolff

Reputation: 74420

This could be a workaround: {not handling all scroll case :(}

$(document).one('mouseenter','.hello', function(){
    $(this).on('scroll',function(){
        console.log('scrolling');
    });
});

Upvotes: 1

Related Questions