From e7f7df54b34ca4a8ee8b9b7960b8a0bc1cee6d26 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Thu, 15 Mar 2018 11:48:13 +0300 Subject: [PATCH] using faster "prop" method to find checked element --- code/html/custom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/html/custom.js b/code/html/custom.js index 655e257c..b2e90172 100644 --- a/code/html/custom.js +++ b/code/html/custom.js @@ -161,9 +161,9 @@ function validateForm(form) { function getValue(element) { if ($(element).attr("type") === "checkbox") { - return $(element).is(":checked") ? 1 : 0; + return $(element).prop("checked") ? 1 : 0; } else if ($(element).attr("type") === "radio") { - if (!$(element).is(":checked")) { + if (!$(element).prop("checked")) { return null; } }