From e688d9bb89e9121834462b31b6f07b8bb2500e30 Mon Sep 17 00:00:00 2001 From: Isaiah Coleman Date: Tue, 14 Jan 2025 12:14:08 -0500 Subject: [PATCH] Fixing checks for betacode input --- pn-site/js/guidesearch.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pn-site/js/guidesearch.js b/pn-site/js/guidesearch.js index 277aad89..49d9096a 100644 --- a/pn-site/js/guidesearch.js +++ b/pn-site/js/guidesearch.js @@ -398,7 +398,7 @@ $(document).ready( $(this).off('focus'); $(this).off('keypress'); $(this).off('keyup'); - var betaOn = $("#beta-on").attr("checked"); + var betaOn = $("#beta-on").is(":checked"); colonFound = false; var selectedRadios = []; @@ -688,11 +688,11 @@ $(document).ready( if($.cookie(hic.BETA_COOKIE) == "beta-on"){ - $("#beta-on").attr("checked", "checked"); + $("#beta-on").prop("checked", true); } else { - $("#beta-on").removeAttr("checked"); + $("#beta-on").prop("checked", false); } @@ -712,7 +712,7 @@ $(document).ready( $("#beta-on").on("change", () => { $(".stringsearch-top-controls:last .keyword").focus(); - var beta = $(this).attr("checked") ? "beta-on" : "beta-off"; + var beta = $(this).is(":checked") ? "beta-on" : "beta-off"; $.cookie(hic.BETA_COOKIE, beta); });