3
A simple addition of jQuery code unchecks everything, both when loading the page and when returning to it:
$("input[type='checkbox']").prop('checked', false);
If the checkbox
have a class
in common:
$("input.class").prop('checked', false);
or $(".class").prop('checked', false);
Or belong to a div
with a id
:
$("#div input[type='checkbox']").prop('checked', false);
Or in a single form
on the page:
$("form input[type='checkbox']").prop('checked', false);
It is worth remembering that the methods
.removeAttr
and.attr
do not work for change properties checked or disabled in newer versions jQuery.
In the checkbox add:
autocomplete="off"
– juniorb2ss
@juniorb2ss thanks!! solved
– Joao Pedro