Skip to main content

Bug Tracker

Side navigation

#4854 closed feature (worksforme)

Opened July 05, 2009 02:12PM UTC

Closed October 21, 2010 08:17PM UTC

Selector which select more than needed

Reported by: tam424 Owned by: john
Priority: minor Milestone: 1.3.2
Component: selector Version: 1.3.2
Keywords: find Cc:
Blocked by: Blocking:
Description

Hello,

There is a selector called "find". I'm using this selector with ajax and xml. The problem is only about the Firefox browser. I'm also checked it with Internet Explorer and Google Chrome. It is working fine.

The problem at Firefox is that the selector ignores my request to display only the infromation by the names and id I wrote. It displays the all information of the all tags.

For example:

xml file:


<body>

<employee id="001" sex="M" age="19">Premshree Pillai</employee>

<employee id="002" sex="M" age="24">Kumar Singh</employee>

<employee id="003" sex="F" age="21">Suhasini Pandita</employee>

</body>

I used:

var info=$(_ResponoseXML_).find('body').find('#001').text();

alert(info); -> output should be: "Premshree Pillai", but the output at Firefox is: "Premshree Pillai Kumar Singh Suhasini Pandita"... and if there are more it displays the all values into the document.


I hope it will be useful for you.

Thank you,

Tamir.

Attachments (0)
Change History (1)

Changed October 21, 2010 08:17PM UTC by addyosmani comment:1

resolution: → worksforme
status: newclosed

Your incorrect usage of jQuery in this case was retrieving you the entire set. If you instead do something like this Live Test Case (simplified, but works) you'll be able to just retrieve the single value you're after. This is not an issue with the jQuery core.