comment 0

Check if check box is checked or unchecked with jQuery

Check if check box is checked or unchecked with jQuery conditional operator ? :

<input id="checkbox" type="checkbox" />
$("#checkbox").attr("checked") ? alert("Checked") : alert("Unchecked");

More techniques can be found here.