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

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -