Side navigation
#861 closed bug (fixed)
Opened January 22, 2007 02:18PM UTC
Closed January 23, 2007 05:01PM UTC
Last modified June 20, 2007 03:00AM UTC
Regression in 1.1.1: search with context finds parent, not the desired element
Reported by: | klaus.hartl@stilbuer | 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.
Fixed in revision 1172.