Code is this:
<script>
$(document).ready(function () {
alert("funfo");
$("#segunda").click(function () {
var check = $("#segunda").is(":checked");
if (check == "true") {
alert("true");
} else {
alert("false");
}
alert(check);
});
});
</script>
Problem is, the guy selects the checkbox, returns false
, it unchecks, returns false
.. being true
returns when the box is selected, and false
when deselected ..
I've used alert(check);
and it returns true
, and false
, for checked and unchecked, exactly as it was to do, but in checking IF
it always returns an option, which in this case is false
..