On Oct 24, 2008, at 7:09 AM, Robert Koberg wrote:
On Oct 24, 2008, at 2:35 AM, akel wrote:
i've been reading a lot and still does not find any solution to my
query. please find the details below.
<list>
<sample name="a" id="1"/>
<sample name="b" id="2"/>
</list>
in jquery how can i automatically find the element sample with
attribute name equals to a without looping entirely the xml
jQuery supports a kind of XPath syntax, so:
$("/list/[EMAIL PROTECTED]'a']")
The "/" is no longer available and the "@" is deprecated. There is a
basic xpath plugin available if you still want to use these selectors:
http://plugins.jquery.com/project/xpath
--Karl