I am attempting to hide this checkbox, which is a check all checkbox in my table header, using jQuery but am not having much luck.
The view source of the section I am trying to hide from the user is as follows:
<th class="t12subheader" id="CHECK$01"><label for="x01" class="hideMe508">Check All</label><input type="checkbox" name="x02" value="1" onclick="checkAll(this)" /></th>
I have tried both:
$('#x01, label[for="x01"]').hide (); &
$('#x01').hide ();
to no avail.
Also, does it matter the positioning of hiding this checkbox?
Your label hiding is ok, however the checkbox won’t work since it doesn’t have
id="x01", at least in your pasted code. It does havename="x02"so you can find/hide it via that, like this:I’m guessing you meant the label to go with the input, in which case the checkbox should have a matching
idto the label’sfor, like this:Then your selector would be: