Skip to content

Commit

Permalink
Use jQuery prop function instead of attr and removeAttr functions [#26]
Browse files Browse the repository at this point in the history
  • Loading branch information
thebigmunch committed Oct 23, 2016
1 parent 2db72ad commit ae3d7a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/DialogUtils.js
Expand Up @@ -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)
Expand All @@ -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);
Expand Down

0 comments on commit ae3d7a9

Please sign in to comment.