dubbs dubbs - 2 years ago 68
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%") {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download