I have this code:
and
$(\"label\").click(function () {
$(
This would be safer to use:
$(function() {
$('input[type="checkbox"]').bind('change', function (v) {
if($(this).is(':checked')) {
$(this).parent().addClass('active');
} else {
$(this).parent().removeClass('active');
}
});
});
Using change instead of click allows for people that navigate forms using the keyboard.