JQuery
$('div.area').find('input:checkbox').change(function() {
if ($(this).is(':checked')) {
$(this).parent().addClass('active');
} else {
$(this).parent().removeClass('active');
}
});
CSS
.area {
padding:10px;
border:1px solid #ccc;
}
.active{background-color:yellow;}
Thank's Mottie :D
0 comments:
Post a Comment