Bug Tracker

Opened 11 years ago

Closed 11 years ago

#11824 closed bug (cantfix)

scroll event not working in new element

Reported by: mna-lord@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

after an ajax request creating for example 2 elements (test1 parent of test2) $(document).ready(function(){

$("#test1").on("scroll","#test2",function(){

alert('qwerty');

});

});

Change History (3)

comment:1 Changed 11 years ago by mna-lord@…

just to mention that the "click" event works so only scroll has the problem

comment:2 Changed 11 years ago by mna-lord@…

and also the parent and child overflow is set to auto

comment:3 Changed 11 years ago by dmethvin

Resolution: cantfix
Status: newclosed

The scroll event does not bubble so it cannot be used with delegation. I assume the W3C reasoned that if it did, you would see the bubbled event on window and think the window had scrolled.

http://www.w3.org/TR/DOM-Level-3-Events/#event-type-scroll

Note: See TracTickets for help on using tickets.