Side navigation
#11432 closed bug (invalid)
Opened March 03, 2012 01:03PM UTC
Closed March 03, 2012 02:23PM UTC
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
Attachments (0)
Change History (2)
Changed March 03, 2012 01:09PM UTC by comment:1
Changed March 03, 2012 02:23PM UTC by comment:2
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.
http://jsfiddle.net/NzYbe/ - Ubuntu 8.04 Chrome 17.0.963.38 beta & Firefox 10