From ae3d7a9cc37da87143e855ebc7e957559eed65ae Mon Sep 17 00:00:00 2001 From: thebigmunch Date: Sat, 22 Oct 2016 21:19:38 -0400 Subject: [PATCH] Use jQuery prop function instead of attr and removeAttr functions [#26] --- js/DialogUtils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/DialogUtils.js b/js/DialogUtils.js index f1ba1ec..1914381 100644 --- a/js/DialogUtils.js +++ b/js/DialogUtils.js @@ -117,9 +117,9 @@ function getSectionOptionValue(section, name, defaultValue, type) function enableJqueryElem(jq, enable) { if (enable) - jq.removeAttr("disabled"); + jq.prop("disabled", false); else - jq.attr("disabled", "disabled"); + jq.prop("disabled", true); } function initDialogOptions(section, aryDlgOptions) @@ -131,9 +131,9 @@ function initDialogOptions(section, aryDlgOptions) if (dlgOption.type === "bool") { if (val) - $("#" + dlgOption.id).attr("checked", "checked"); + $("#" + dlgOption.id).prop("checked", true); else - $("#" + dlgOption.id).removeAttr("checked"); + $("#" + dlgOption.id).prop("checked", false); } else $("#" + dlgOption.id).val(val);