Answer the question
In order to leave comments, you need to log in
How to invert prop 'checked'?
There is a code that checks 3 parameters.
$('form').submit(function() { // проверка на пустоту заполненных полей. Атрибут html5 — required не подходит (не поддерживается Safari)
if ($(this).find("input[name='name']").val() == '' || $(this).find("input[name='phone']").val() == '' || $('#checkbox4').prop('checked') ) {
valid = false;
return valid;
}
Answer the question
In order to leave comments, you need to log in
$('.myCheckbox').prop('checked', true);
$('.myCheckbox').prop('checked', false);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question