jQuery: check if a checkbox is checked

by John Grivas

HTML

<input type="checkbox" name="check" id="check"/>

JavaScript

$('#check').change(function() {
var active = $(this);
alert($(active).is(":checked"));
});