Can someone tell me if this jquery code makes sense. I have it wrapped in a document ready block. I am trying to hide an element if the set of conditions are true, but when I click on the submit button, knowing that one of the checkboxes is indeed checked, the element appears instead of being hidden. Is there anything obvious that I am missing with the below code:
$('#submit').on('click', function() {
if ($('#Option1').not(':checked') &&
$('#Option2').not(':checked') &&
$('#Option3').not(':checked') &&
$('#Option4').not(':checked') &&
$('#Option5').not(':checked')) {
$("form").submit(function () {
return false;
});
$('#selectOption').show();
} else {
$('#selectOption').hide();
}
});