How to hide a label for="x01" Checkbox using jQuery

Posted by tonsils on Stack Overflow See other posts from Stack Overflow or by tonsils
Published on 2010-04-22T15:01:09Z Indexed on 2010/04/22 15:03 UTC
Read the original article Hit count: 281

Filed under:

Hi,

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.

Any help using jQuery would be appreciated.

Also, does it matter the positioning of hiding this chckbox?

Thanks.

© Stack Overflow or respective owner

Related posts about jQuery