#7702 closed bug (invalid)
.live/.delegate do not work for .load events
Reported by: | RTPMatt | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.6 |
Component: | unfiled | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The docs say .live works for all events now, but I can't seem to make them work for load event. #6143seems to say the same thing, but was closed. Here is my test case:
Change History (5)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
The way that live and delegate work is by using event bubbling. That is, the events that travel up the dom tree, alerting their parents of the activity.
The load event, unfortunately, is not an event that bubbles. (see http://en.wikipedia.org/wiki/DOM_Events for a list of events and if they bubble)
Good work on distilling the problem down - it looks like you'll do great helping us find and eliminate bugs as we move forward :D
Oh, and as an example of my ramblings, notice how the load event on the parent div doesn't fire: http://www.jsfiddle.net/danheberden/EpfzF/
Dan
comment:3 Changed 12 years ago by
To reduce future confusion, we'll update the documentation to specify events that bubble. So good that you brought it to our attention.
comment:4 Changed 12 years ago by
Keywords: | needsdocs added |
---|
comment:5 Changed 12 years ago by
Keywords: | needsdocs removed |
---|
http://www.jsfiddle.net/Cj64g/2/
Fixed the delegate tests case, same result.