I have the follwoing code:
$("input:checkbox").live('click', function() {
alert($(this).val());
});
True is shown if the checkbox is checked. However, if the checkbox is checked and I uncheck it, the value shown is still true. How can I correct that? What is wrong with the code? Thanks
The value of a checkbox is always the same. You need to see if it is checked or not.