Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#6016 closed bug (invalid)

live() Fails on jQuery'd content

Reported by: brendo_ Owned by:
Priority: major Milestone: 1.4.2
Component: event Version: 1.4.1
Keywords: events Cc:
Blocked by: Blocking:


See the test case, it's the best way I can describe it.

Attachments (1)

brendan.html (921 bytes) - added by brendo_ 13 years ago.
Test Case

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by brendo_

Attachment: brendan.html added

Test Case

comment:1 Changed 13 years ago by brendo_

I believe this could be because jQuery() doesn't return a set anymore in 1.4?

That said, what's the best way to do what in the test case now?

comment:2 Changed 13 years ago by john

Component: unfilledevent
Resolution: invalid
Status: newclosed

Naturally - how would that work? The point of live events is that it uses a selector to find elements to keep them up-to-date. If you're working against a document fragment (or a single element, in this case) then there's nothing to keep up to date. Live events work by doing event delegation - doesn't seem like using event delegation makes sense in this case, just use regular bind.

comment:3 in reply to:  2 Changed 13 years ago by brendo_

Ah ok, seems like a misunderstanding on my behalf then.

Does this mean the correct way to attach events to elements that are added to the document using after/before/append/prepend should be through bind and not live?

Note: See TracTickets for help on using tickets.