Ticket #9005 (closed bug: wontfix)
.live() breaks when using .add()
| Reported by: | jasmin@… | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.next |
| Component: | unfiled | Version: | 1.5.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
See example :
Change: .live("click",function......) to : .click(function....) and it works like a charm.
Tested with 1.5.2 and 1.4.2
Change History
comment:1 follow-up: ↓ 2 Changed 2 years ago by ajpiano
- Status changed from new to closed
- Resolution set to wontfix
comment:2 in reply to: ↑ 1 Changed 2 years ago by anonymous
Replying to ajpiano:
Thanks for taking the time to help out the jQuery project, but this is a known limitation of .live(), as it is stated on the documentation
"DOM traversal methods are not supported for finding elements to send to .live(). Rather, the .live() method should always be called directly after a selector, as in the example above."
You may find that the delegate method is more appropriate for your use case.
Hi,
Thank you for taking time to respond. I did not understand correctly that part of the documentation.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for taking the time to help out the jQuery project, but this is a known limitation of .live(), as it is stated on the documentation
"DOM traversal methods are not supported for finding elements to send to .live(). Rather, the .live() method should always be called directly after a selector, as in the example above."
You may find that the delegate method is more appropriate for your use case.