I'm working with the jQuery Tablesorter Filters plugin and I'm trying to hide certain <td>
. This is what I'm looking to do:
-If <td>
contains <input class="tablesorter-filter disabled">
, hide the parent <td>
<tr class="tablesorter-filter-row">
<td>
<input class="tablesorter-filter">
</td>
<td>
<input class="tablesorter-filter disabled">
</td>
<td>
<input class="tablesorter-filter">
</td>
</tr>
<script>
jQuery(function ($) {
$(".tablesorter-filter-row td").filter(function(i) { return $(this).find("> input.disabled").length > 0 }).hide();
});
</script>
That is the jQuery I culled from another issue I had, but it's not hiding the parent td in this instance.