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
all of the code posted here just disable the buttons as the title suggested,on each function though while disabling or enabling a button you have to slide the content you want to show ,cant work by itself
I figured out the problem. Apparently @pixelgrid‘s code only works if the button images with the onclick are made into actual button tags even when i matched the class names in both the jquery and image tags. If my images have the class as in the jquery code it wouldn’t work. @pixelgrid would you mind making it so that it also accepts the img tags with the class