I have 2 buttons, each of which has toggle function with 2 functions inside toggles. I have a problem that I want to restart the toggle if the user did not click on the same button twice on the example, then the user will click on the first function on X, if he clicks on Y And then click on X again, the first function will fire again. But if X clicks on the first function then it will set a fire and it will click on X again and then the second function will fire.
$ ('x'). Toggle (function () {// something}, function () {// some}} $ ('y') toggle (function () {// some}, function () {// some}}
Please tell me I have the opinion and if there is a better solution than toggle ... please tell me
No .toggle
, as this will not require you. Instead, change the" X "button position (and change state to execute your tasks) Make some custom in Can be treated the "Y" button.
Comments
Post a Comment