Bug Tracker

Ticket #11824 (closed bug: cantfix)

Opened 3 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

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

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

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

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

and also the parent and child overflow is set to auto

comment:3 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to cantfix

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.