Bug Tracker

Opened 11 years ago

Closed 11 years ago

#11432 closed bug (invalid)

live() with parent()

Reported by: 66Ton99 Owned by:
Priority: low Milestone: None
Component: event Version: git
Keywords: Cc:
Blocked by: Blocking:


   <div id="id_div"></div>
    jQuery('#id_div').parent().find('a').live('click', function() { alert('Click'); });

And after click on link you will receive error "Uncaught Error: Syntax error, unrecognized expression: )" If change live to click everything works fine

Change History (2)

comment:1 Changed 11 years ago by 66Ton99

http://jsfiddle.net/NzYbe/ - Ubuntu 8.04 Chrome 17.0.963.38 beta & Firefox 10

comment:2 Changed 11 years ago by sindresorhus

Component: unfiledevent
Priority: undecidedlow
Resolution: invalid
Status: newclosed

.live() docs:

Chaining methods is not supported. For example, $("a").find(".offsite, .external").live( ... ); is not valid and does not work as expected.

Note: See TracTickets for help on using tickets.