[jQuery] Higher order functions

[jQuery] Higher order functions

...Tally-ho!
$("p.commented-by a").get()
gives me an array of nodes, of which I want to process a subset,
matching a programmatic expression, let's say for simplicity's sake,
those where node.rel == 'nofollow'.
I tried (to little avail) these variants, after a few very light peeks
at the JQuery source:
$("p.commented-by a").filter(function(){ return this.rel == 'nofollow'; }).get()
$("p.commented-by a").grep(function(){ return this.rel == 'nofollow'; }).get()
but the first I think only accepted a (CSS?) string parameter, and the
latter didn't exist -- I was confused by a stand-alone $.grep,
operating on common arrays. I'd love either or both methods to work.
...or to find out how these things are supposed to be done the JQuery way. :-)
--
/ Johan Sundström, http://ecmanaut.blogspot.com/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/