You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMHO: I personally find this "change" event handling a bit complicated. Wouldn't it be possible for a switch to trigger a "click" on the checkbox?
Then you could simply use the onclick event in the tag.
i have modify the toggle function:
Toggle.prototype.toggle = function () {
if (this.$element.prop('checked')) this.off()
else this.on()
this.$element[0].click() // <- triggers the onclick event of the <input> tag :)
}
Best regards
Clemens
The text was updated successfully, but these errors were encountered:
Hello,
IMHO: I personally find this "change" event handling a bit complicated. Wouldn't it be possible for a switch to trigger a "click" on the checkbox?
Then you could simply use the onclick event in the tag.
i have modify the toggle function:
Best regards
Clemens
The text was updated successfully, but these errors were encountered: