Best way to get true/false from a checkbox?
Hi.
I just started to use jquery.
What is the easy way to do this:
- var AllDay = null;
function GetCheckBoxValue() {
if ($('#myCheckBox).attr('checked') == false) {
AllDay = "false";
} else {
AllDay = "true";
}
}
I need to get the true or false from the checkbox. Above works fine, but there most be a smarter way to do it.