I want the browser to focus on the input after clicking the focus button.
But before that I want it to add a class first and then focus. Is this possible? Or can I only use callback functions on 'animations' like hide, click etc.
I've created a jfiddle: https://jsfiddle.net/6ktgc4h9/5/
Callbacks are used for asynchronous operations. They aren't needed for synchronous operations. Just execute the code in the order you want it executed: