Jquery, checkboxes and isChecked
- by Ben
When I bind a function to a checkbox element like:
$("#myCheckbox").click( function() {
alert($(this).is(":checked"));
});
The checkbox changes it checked attribute before the event is triggered, it's it normal behavior, thus giving and inverse result.
However, when I do:
$("#myCheckbox").click();
The checkbox changes it checked…