Browse Source

using faster "prop" method to find checked element

rfm69
Maxim Prokhorov 6 years ago
parent
commit
e7f7df54b3
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      code/html/custom.js

+ 2
- 2
code/html/custom.js View File

@ -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;
}
}


Loading…
Cancel
Save