Wait for function to finish before starting again.
- by Matthew Brown
Good Morning,
I am trying to call the same function everytime the user presses a button. Here is what happens at the moment..
User clicks button - Calls function - function takes 1000ms+ to finish (due to animation with jQuery and AJAX calls)
What I want to happen is every time the user presses the button it adds the function to the queue, waits for the previous call to finish, and then starts..
Is this possible?
Sorry if my explanation is a bit confusing..
Thanks Matthew