[jQuery] Higher order functions
XPath is definitely a handy language to know when it comes to node selection
in JQuery. I wish it came to me naturally but I am not there yet. It's very
much like the mindset of using regular expressions on strings. Now I see
code that tries to parse a string with indexOf/substring and think, "Why
don't they use a RegExp?"
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On
Behalf Of phillip.oldham@kilo75.com
Sent: Friday, April 07, 2006 3:05 AM
To: discuss@jquery.com
Subject: Re: [jQuery] Higher order functions
Can't you just use a simply XPath method? Try this:
$("//p[@class='commented-by']//a[@rel='nofollow']").get()
That should give you all the nodes you need, without having to use further
filter/grep methods.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/