#9005 closed bug (wontfix)
.live() breaks when using .add()
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | 1.next |
Component: | unfiled | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
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 (2)
comment:1 follow-up: 2 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
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.
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.