[jQuery] Re: find table rows that contains text

2008-11-25 Thread Pierre Bellan
Hi, I think you must use the filter function. I made this little test : var mySearch = '63'; $('table tr:contains('+mySearch+')').filter(function(){ if ($.trim($(this).text()) == mySearch ) { return true; } else{ return false; } }); The text() method removes all

[jQuery] Re: find table rows that contains text

2008-11-25 Thread Sridhar
Thank you that worked. I made some changes since my table row contains more than one cell. var mySearch = '63'; var a = $('table tbody tr td a:contains(' + mySearch + ')').filter (function(){ //alert($.trim($(this).text()));