jQuery: check if a checkbox is checked
by hcanning2012
HTML
<div class="col-md-4 themed-grid-col"><label><input type="checkbox" autocomplete="off" id="t7" onclick="t7()"> Room and Board - $1820 per month</label></div>
CSS
.test {
padding: 1em;
background-color: #fffcb5;
}
JavaScript
function t7() {
if (document.getElementById('t7').checked) {
alert("checked");
} else {
alert("You didn't check it! Let me check it for you.");
}
}