Side navigation
#6016 closed bug (invalid)
Opened February 03, 2010 04:04AM UTC
Closed February 03, 2010 07:16PM UTC
Last modified February 04, 2010 03:57AM UTC
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: |
Description
See the test case, it's the best way I can describe it.
Attachments (1)
Change History (3)
Changed February 03, 2010 05:06AM UTC by comment:1
Changed February 03, 2010 07:16PM UTC by comment:2
component: | unfilled → event |
---|---|
resolution: | → invalid |
status: | new → closed |
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.
Changed February 04, 2010 03:57AM UTC by comment:3
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?
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?