Checkbox not returning correct value
Hi
I am checking to see if a checkbox is NOT checked with this code where cbi is the checkbox item ...
if (Apperyio("cbi").find("input").not(":checked")) {
alert('True');
}
else {
alert('False');
}
It returns True, whether the checkbox is ticked or not.
However when I check to see if the checkbox IS checked it returns the correct values. True when checked and False when not checked.
if (Apperyio("cb2").find("input").is(":checked")) {
alert('True');
}
else {
alert('False');
}
This is not logical.
I need to return TRUE if a checkbox is NOT checked and FALSE if it is checked. Please can you clarify why this is not working as it should.
Thank you