Ticket #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: | ||
| Blocking: | Blocked by: |
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
comment:2 Changed 2 years ago by danheberden
- Status changed from new to closed
- Resolution set to invalid
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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

http://www.jsfiddle.net/Cj64g/2/
Fixed the delegate tests case, same result.