Skip to main content

Bug Tracker

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:

Consider the following snippet:

<ul id="nav">
$('<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.

Attachments (0)
Change History (2)

Changed January 23, 2007 05:01PM UTC by joern comment:1

resolution: → fixed
status: newclosed

Fixed in revision 1172.

Changed January 25, 2007 05:14PM UTC by comment:2

I tried revision 1172 and got: $(document).ready is not a function error. Do I miss something?