From 705efb493c8767ee497e6b448ad7b69552af253d Mon Sep 17 00:00:00 2001 From: gaobin Date: Tue, 27 Nov 2018 15:51:15 +0800 Subject: [PATCH] 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 --- _custom/admonition_selector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_custom/admonition_selector.js b/_custom/admonition_selector.js index e4876625..3776e9ff 100644 --- a/_custom/admonition_selector.js +++ b/_custom/admonition_selector.js @@ -21,7 +21,7 @@ $(document).ready(function() { // check value of cookies and set state to the related element if ($.cookie($(this).attr("id")) == "true") { $(this).prop("checked", true); - } else if (($.cookie($(this).attr("id")) == "false")) { + } else { $(this).prop("checked", false); }