Amit Shah Amit Shah - 6 months ago 16
jQuery Question

jQuery: Exclude those td, having child element Label with class "control-label"

I am trying to select all td in document using jQuery,excluding those td which have child element label with class name "control-label".

<td width="30%"><label class="control-label">IP Address</label></td>

I tried:

jQuery("table td").not("table td > label.control-label").attr('width','');


Try this selection:

$('td:not(:has(> .control-label))');