tags:

views:

362

answers:

2

I'm trying to highlight just one specific row in a table using jQuery. The row will have an 'active' status. I have seen plenty of examples online which show how to do zebra striping for alternate row styling. Does anyone know of a jQuery expression which will get a element based on the value of a element in a specific column?

+6  A: 

check out ":contains" on http://docs.jquery.com/Selectors

YonahW
Perfect. Every time I start to think something will be complicated w/ jQuery, there's a one-liner that gets it done. Thanks.
Mark Struzinski
+1  A: 

$("td").contains("test")

or $("div:contains('John')")

gamue
Can't get $("td").contains("test") to work. Though $("div:contains('John')") is OK.
Alexander Prokofyev