jquery - onchange event does not work when the element is changed by another one -
I have a Changebox with a Change Event and a button that checks and unchecks this checkbox. The event is removed when I manually check and uncheck. But when I press the button to change the position of the checkbox, then it does not remove an event.
You can see an example here:
& lt; Input type = "checkbox" id = "1" & gt; & Lt; Input type = "button" id = "2" value = "click" & gt; Do you have ideas for turning events on when pressed on a button.
is related to
You of $ ("# 1") Can be used. The trigger ("Change") to trigger the event and click prop ("check",! $ ("# 1") .prop ("check") . Try it: $ (document) .on ("click", "#prop (" check "));} ($ 1)" $ "(" # 1 "). ("Change", "# 1", function () {warning ("change")});
Comments
Post a Comment