Skip to main content

Bug Tracker

Side navigation

#11824 closed bug (cantfix)

Opened May 28, 2012 09:45AM UTC

Closed May 28, 2012 09:53PM UTC

scroll event not working in new element

Reported by: mna-lord@hotmail.com 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');

});

});

Attachments (0)
Change History (3)

Changed May 28, 2012 09:48AM UTC by mna-lord@hotmail.com comment:1

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

Changed May 28, 2012 09:54AM UTC by mna-lord@hotmail.com comment:2

and also the parent and child overflow is set to auto

Changed May 28, 2012 09:53PM UTC by dmethvin comment:3

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