I need to remove one <tr> row in a rendered page using remove(); by targeting the <label> name. See the markup below.
There are other <tr>rows in this table that need to remain. Is it possible to target one row in the table by either the text label name “Website” or label for="url"?
I.e.
jQuery(document).ready(function( $ ){
$("target the <tr> by label name Website or "url" ").remove();
});
HTML markup:
<tr>
<th><label for="url">Website</label></th>
<td><input type="text" name="url" id="url" value="" class="regular-text code" /></td>
</tr>
Why not selecting the input which has ID attribute?
Or if you want to select the label you can use attribute selector:
Or
hasmethod:But using ID selector is much efficient.