The label's "for" attribute has the ID of a Radio button. I 'm able to hide the radio button but not the label. how can I hide the label.??
If you use jQuery:
$('#radio_btn').hide();
$('label[for="radio_btn"]').hide();
Or with different markup:
HTML:
<label for="radio"><input type="radio" id="radio"> Radio</label>
JS:
$('label[for="radio"]').hide();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.