When I check a checkbox, I want it to turn <p>
#0099ff
.
When I uncheck the checkbox, I want it to undo that.
Code I have so far:
$('#checkbox').click(function(){
if ($('#checkbox').attr('checked')) {
/* NOT SURE WHAT TO DO HERE */
}
})
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…