Amit Shah Amit Shah - 8 months ago 31
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))');