I have two buttons performing two different things but in the same way. If i click the first button an animation happens and to undo the animation you must click the same button once more. But if the user clicks the second button instead of the first one, the other animation for that second button happens, without undoing the first animation and everything goes nuts. So if a user clicks the first button, how do i disable the second button from being clicked until the user clicks that same button once again to undo the animation, and then the second button click is re-enabled?
EDIT: and of course this would need to happen both ways.
Here you go. Sorry it’s so messy. One button should be unclickable when the other is clicked once, when i’ts clicked twice, the other should be clickable. Scroll down a bit to see the buttons. ;lkbjvk http://codepen.io/Jarolin/pen/agmkf