Skip to main content

Bug Tracker

Side navigation

#3833 closed bug (fixed)

Opened January 13, 2009 12:16PM UTC

Closed January 20, 2009 04:01PM UTC

live() does not work for a non-existent id selector

Reported by: Owned by: john
Priority: major Milestone: 1.3.1
Component: core Version: 1.3
Keywords: Cc:
Blocked by: Blocking:

live() does not seem to work for an id selector which does not exist initially but is inserted later in DOM through AJAX. It seems to work fine if I use a class selector for the same element.

Attachments (0)
Change History (3)

Changed January 13, 2009 12:31PM UTC by comment:1

I added one example to illustrate the issue.

    $(function() {
        $("#fooid").live("click", function() {
        $(".fooclass").live("click", function() {

        $("body").append("<a id='fooid' href='javascript:void(0)'>Click Me. I do not work.</a><br/><br/>");
        $("body").append("<a class='fooclass'  href='javascript:void(0)'>Click Me. I will work.</a>");

Changed January 15, 2009 02:00PM UTC by john comment:2

need: ReviewTest Case
owner: brandonjohn
version: → 1.3

Changed January 20, 2009 04:01PM UTC by john comment:3

component: eventcore
resolution: → fixed
status: newclosed

Fixed in SVN rev [6140].