Skip to main content

Bug Tracker

Side navigation

#2490 closed bug (fixed)

Opened March 11, 2008 10:07PM UTC

Closed June 20, 2010 05:57PM UTC

Last modified March 09, 2012 02:28AM UTC

wiki page for Traversing/find somewhat misleading

Reported by: StaticShock Owned by: john
Priority: minor Milestone: 1.3.2
Component: core Version: 1.3.1
Keywords: Cc:
Blocked by: Blocking:
Description

page: http://docs.jquery.com/Traversing/find

text: same as $("p span")

That isn't precisely right. here's an example:

var x = $('<div><div><div><a></a></div></div><div>');

alert(x.find('div a').length);

alert(x.find('div').find('a').length);

on jq 1.2.3 that displays "1" and then "2"

i'm posting this as a bug just in case the wiki is correct.

Attachments (0)
Change History (8)

Changed March 13, 2008 12:41AM UTC by davidserduke comment:1

The wiki page is correct but your test case is different from what it says.

x.find('div').find('a') is not the same as $('div').find('a')

I suppose this bug could question whether or not find should remove non-unique results. There might be performance reasons why it isn't included now or other reasons I'm not aware of.

Changed March 13, 2008 09:34AM UTC by remysharp comment:2

You can replicate the bug using $('div').find('a') by visiting the bbc.co.uk home page - here's the output from Firebug:

>>> $j.fn.jquery

"1.2.3"

>>> $j('a').length

324

>>> $j('div a').length

324

>>> $j('div').find('a').length

1863

Changed January 18, 2009 02:46AM UTC by dmethvin comment:3

Confirmed in jQuery 1.3. I would have expected find to remove the dups.

Changed February 18, 2009 02:11AM UTC by john comment:4

milestone: 1.2.41.3.2
resolution: → fixed
status: newclosed
version: 1.2.31.3.1

Fixed in SVN rev [6199].

Changed March 11, 2009 04:31PM UTC by ooBartez comment:5

resolution: fixed
status: closedreopened

Still doesn't work as in the wiki. Try this:

var x = $('<div><div><div><a></a><a></a></div></div><div>');

console.log(x.find('div a').length);

console.log(x.find('div').find('a').length);

The output is

2

1

Should be

2

2

Changed March 12, 2009 12:18AM UTC by dmethvin comment:6

owner: → john
status: reopenednew

Changed June 20, 2010 05:57PM UTC by dmethvin comment:7

resolution: → fixed
status: newclosed

Works properly (2 2) with 1.4.2 in Firefox 3.6.3 and IE8.

Changed December 13, 2011 07:25AM UTC by anonymous comment:8

That's the reason you will have an end heavy homework prior to investment your time and efforts and money on a phlebotomy training training.A wonderful phlebotomy schooling institution will have to assurance that you will have got a thorough training from the most essential top features of phlebotomy, most of these because human body, circulatory process, connection, administrative relationships and many others. In addition, the institution will need to have a great good reputation for their outstanding education, to the teachers offering the products, and for the official qualifications enterprise it really is connected to. Your training is really what makes a difference probably the most researching for just a vocation. It's in the employer's awareness to hire the effectively-educated phlebotomist who seem to continues your phlebotomy qualifications.The actual phlebotomy classes solutions distributed by the vast majority of educational institutions possess specific occasion spans of which rely on the diploma that they can allow. With regard to just to illustrate, a documentation diploma technique persists solely several months. While the bachelor amount technique can easily closing sometimes 4 decades, without having rising the internship time frame and that is required regardless of the process you're considering.The application are not amused as well as deemed simply by doctor's offices or even every wellbeing appropriate amenities if you have not obtained any kind of phlebotomy certification. That is why it is quite imperative that you appear with Phlebotomy training and have absolutely your specific Phlebotomy certification. Even now, just 2 of a Expresses in america primarily demand authentic qualifications however it is typically better to prosper of everyone and stay trained at a person of your accredited educational facilities or teaching locations for Phlebotomy.Generally, assessments for Phlebotomy qualification are attained using a laptop or computer in the world-wide-web. This is an simplicity for many most of these will probably be taking the test and there's a even larger chance in which no-one is likely to miss the actual Phlebotomy examination. The evaluation with usual is organized in a manner that it can be sure all of the Phlebotomy job hopefuls employ a complete and also substantial understanding each of the topics along with themes related so that you can Phlebotomy and also this is performed because they build a test which is connected in one certain piece towards the future.If you have not considered every advanced schooling review system, you want never agonize.