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: |
Description
<body> <div> <div id="id_div"></div> <a>link</a> </div> <script> jQuery('#id_div').parent().find('a').live('click', function() { alert('Click'); }); </script> </body>
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
comment:2 Changed 11 years ago by
Component: | unfiled → event |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
.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.
http://jsfiddle.net/NzYbe/ - Ubuntu 8.04 Chrome 17.0.963.38 beta & Firefox 10