Skip to main content

Bug Tracker

Side navigation

#7562 closed bug (invalid)

Opened November 19, 2010 08:53AM UTC

Closed November 19, 2010 09:30AM UTC

Live on complex objects

Reported by: DmitryR Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script>
$(function() {
    $('.c1').not('.c2').live('click', function() { //<== .bind() works
        alert(123);
    })
});
</script>

<div class="c1">c1</div><br />
<div class="c1 c2">c1 c2</div><br /><br />

First div must show alert on click.

It doesn't work with live but works with bind.

Attachments (0)
Change History (1)

Changed November 19, 2010 09:30AM UTC by jitter comment:1

resolution: → invalid
status: newclosed

Thanks for taking the time to contribute to the jQuery project by writing a bug ticket and providing a testcase!

This isn't a bug. As the documentation for live states in the "Caveats" section

DOM traversal methods, or a context argument to the jQuery() method, are not supported for finding elements to send to .live().