lib: allow change value through js

only in case skip is true
as we won't fire event, we allow to change
that value to display the switcher as it should
This commit is contained in:
Pierre Verkest
2015-10-02 00:31:51 +02:00
parent 9ce5e96ad8
commit 11b544bb73
2 changed files with 5 additions and 1 deletions

View File

@@ -135,6 +135,9 @@
if (typeof value === "undefined") {
return this.options.state;
}
if (!skip && (this.options.disabled || this.options.readonly)) {
return this.$element;
}
if (this.options.state && !this.options.radioAllOff && this.$element.is(":radio")) {
return this.$element;
}