#861 closed bug (fixed)
Regression in 1.1.1: search with context finds parent, not the desired element
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | major | Milestone: | |
Component: | core | Version: | 1.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Consider the following snippet:
<ul id="nav"> <li>...</li> </ul>
$('<li><a href="#">Change location</a></li>').prependTo('#nav').find('a').bind('click', function() { var close = $('span', this); // same with $(this).find('span'); console.log( close[0]); // it's the <a> and not a <span> element return false; });
The query $('span', this) returns the parent element if there's no match.
Change History (2)
comment:1 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 16 years ago by
I tried revision 1172 and got: $(document).ready is not a function error. Do I miss something?
Note: See
TracTickets for help on using
tickets.
Fixed in revision 1172.