Checking if box is checked
I have the following JS code:
else if ($('#tos').is(':not(:checked)')){
alert("Error");
}
And the tos element:
<input type="checkbox" name="tos" value"1">
When I click my submit button, without checking it, the error doesn't pop
up. Any reason why?
No comments:
Post a Comment