Bug Tracker

Opened 13 years ago

Closed 13 years ago

#7562 closed bug (invalid)

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:


<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
$(function() {
    $('.c1').not('.c2').live('click', function() { //<== .bind() works

<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.

Change History (1)

comment:1 Changed 13 years ago by jitter

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().

Note: See TracTickets for help on using tickets.