dubbs dubbs - 1 year ago 53
Javascript Question

jQuery Hide TDs without specified content

Looking for a way to hide the

s in a
which don't contain the inline CSS attribute

code example below.

<td class="" id="">
<td class="" id="">
<td class="" id="">
<td width="12%" class="" id=""><!-- don't hide me! --></td>

So, the first 3
s should get hidden only...

Answer Source

You can do it easier with CSS, but since you asked for a jQuery solution, something like this should work..

      if ($(this).attr('width') !== "12%") {