tags:

views:

44

answers:

2

I'm getting magical with some data filtering. When hitting a drop down list I want to eliminate rows from a table where a certain column does not contain the text from the drop down list. I've tried various combinations without any luck as follows:

$("table tr td:contains('" + $("#SupplierID :selected").text() + "')").parent().hide();

This obviously hides the ones that do contain the selected text. I've tried not:contains but that doesn't work at all. So yeah, I want to do the inverse of this. And can I do it for a certain column? There's no point going through all the columns as it only applies to one column.

Cheers!

+2  A: 

You can do it like this:

$("table tr td:nth-child(...):not(:contains(...))")
Greg
Thankyou for reading my entire post :)
Kezzer
A: 
:not(:contains("text"))

Is what you need

meder