Side navigation
#9005 closed bug (wontfix)
Opened April 28, 2011 02:02PM UTC
Closed April 28, 2011 02:12PM UTC
Last modified April 28, 2011 02:49PM UTC
.live() breaks when using .add()
Reported by: | jasmin@leflasheux.com | 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
Attachments (0)
Change History (2)
Changed April 28, 2011 02:12PM UTC by comment:1
resolution: | → wontfix |
---|---|
status: | new → closed |
Changed April 28, 2011 02:49PM UTC by comment:2
Replying to [comment:1 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.