Modify judgment logic
The element id in the page either exists or does not exist, and the checkbox box has only two states.Unless there is a third case, we use else if Change-Id: I0eb059757104b1ddd9a8758ce8833c51c52a58b6
This commit is contained in:
parent
212d08ae6e
commit
705efb493c
|
@ -21,7 +21,7 @@ $(document).ready(function() {
|
||||||
// check value of cookies and set state to the related element
|
// check value of cookies and set state to the related element
|
||||||
if ($.cookie($(this).attr("id")) == "true") {
|
if ($.cookie($(this).attr("id")) == "true") {
|
||||||
$(this).prop("checked", true);
|
$(this).prop("checked", true);
|
||||||
} else if (($.cookie($(this).attr("id")) == "false")) {
|
} else {
|
||||||
$(this).prop("checked", false);
|
$(this).prop("checked", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue