Not sure, but maybe like this ...

$("#sqltable tr td:contains(" + $('#workgroup').val() + ")").toggleClass("highlight");


--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Sep 19, 2007, at 2:03 PM, Graeme B. Davis wrote:


I'm trying to highlight some rows of a table, and previously did this with
the following code:

$('#sqltable').find('td').contains($('#workgroup').val ()).toggleClass("highl
ight");

The new code:

$("#sqltable tr td:contains(TEXT TO SEARCH FOR
HERE)").toggleClass("highlight");

How do I specify $('#workgroup').val() for the text to search for, like the
first example?

Thanks in advance.... It's just not clear to me... I've also tried
.filter(':contains($('#workgroup').val())')

Graeme


Reply via email to