javascript - Can't delegate scroll event using jQuery -
i'm trying use jquery fire event on scroll on particular class of elements, so:
$('body').on('scroll', '.overflow', function() { stuff; }); however, do stuff never happens. i've done little experimentation, , looks though scroll event can't delegated using .on. (see http://jsbin.com/ajediru/2 test case).
is there way can delegate? or there reason™ why should never set delegate in fashion?
according w3, scroll event doesn't bubble.
since event delegation relies on event bubbling element you've attached handler to, won't able use delegation.
Comments
Post a Comment