Help with unit testing checkbox behavior. I have this page:
How about using change instead of click?
$('#makeHidden').change(function() {
var isChecked = $(this).is(':checked');
if (isChecked) {
$('#displayer').hide();
}
else {
$('#displayer').show();
}
return false;
});
The return false; won't be in the way since the event is fired as a result of the change having occurred.