Bug Tracker

Modify

Ticket #3908 (closed bug: worksforme)

Opened 4 years ago

Last modified 4 years ago

find only returns 1 element

Reported by: roweiss Owned by: john
Priority: critical Milestone: 1.3.1
Component: selector Version: 1.3
Keywords: Cc:
Blocking: Blocked by:

Description

performing the following only returns 1 element:

var test = $('<li><div class="class1"></div><div class="class2"></div></li>').find("div");

It should return both div's, however it only returns the first one.

I am using the following version:

/*! 2 * jQuery JavaScript Library v1.3 3 *  http://jquery.com/ 4 * 5 * Copyright (c) 2009 John Resig 6 * Dual licensed under the MIT and GPL licenses. 7 *  http://docs.jquery.com/License 8 * 9 * Date: 2009-01-13 12:50:31 -0500 (Tue, 13 Jan 2009) 10 * Revision: 6104 11 */

Change History

comment:1 Changed 4 years ago by scott.gonzalez

  • Status changed from new to closed
  • Resolution set to worksforme

Using jQuery 1.3 (what you've said you're using), your test code returns two elements for me.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.