Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#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:


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 anonymous


Fixed the delegate tests case, same result.

comment:2 Changed 12 years ago by danheberden

Resolution: invalid
Status: newclosed

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/


comment:3 Changed 12 years ago by danheberden

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 danheberden

Keywords: needsdocs added

comment:5 Changed 12 years ago by danheberden

Keywords: needsdocs removed
Note: See TracTickets for help on using tickets.