>> You can try the powerful .filter() method with an anonymous >> function as its argument: >> >> $('someElement').filter(function() { >> return $(this).text() == 'Some text'; >> }); > > I will try this, thanks!
It works well! Do you think it is usefull, for performance, to first filter with :contains() before using .filter()? $('#indirectly > ol > li > a:contains(' + related + ')').filter(function() { return ($(this)[0].textContent == related); }).parent().show('slow'); vs $('#indirectly > ol > li > a').filter(function() { return ($(this)[0].textContent == related); }).parent().show('slow'); ("related" comes from previous code) I tried to profile both with Firebug, with not much difference, but I don't have a lot of data to parse yet. -Nicolas -- Nicolas "Brush" HOIZEY Clever Age : http://www.clever-age.com/ Gastero Prod : http://www.gasteroprod.com/ Photos : http://www.flickr.com/gp/[EMAIL PROTECTED]/M1c002