I've been scouring the jquery documentation for some time looking for a function with the following behavior
Suppose we have two buttons on the screen each with a different click event:
<button>Effetc1</button>
<button>Effetc2</button>
<div> Click in first button to change</div>
The first triggers an animation, the second launches alert. I want the second button event to wait until the first button is completed.
But they are two separate events, so you can not override callbacks, I want during the execution of the first event, no other event to run until the completion of the first. Example below