I know I have already asked this question here . But since I dint find the solution there. I am re-posting the same question. Kindly bear with me.
Please find the fiddle here.
HTML:
<label>
<input type="checkbox" id="" class="checkbox" name="Hello"><span>Hello</span>
</label>
CSS:
label {
display: block;
width: 85%;
font: normal 12px/1.6em Arial;
}
.correctPadding .checkbox {
margin: 0;
display: inline;
margin-right: 6px;
margin-top:2px;
}
input[type="checkbox"]:checked + span {
font-weight: bold;
}
My JS trial is:
if ($('.checkbox').is(':checked')) {
$(this).next().css({ "font-weight": "bold" })
}
The check box label should get bold, when a check box is checked. It is working in all browsers, except for IE8.
Can we solve this please