I have a question, I think the answer will be simple, but I can not find it ...
I have a function that creates content using ajax. At the end of the function, I want to do something with the created content. To do this, I need to wait until all the content has been created before I can do something with it.
I prefer something like this:
viewAllAccounts(function() {
or
viewAllAccounts().queue(function() {
But to no avail, this is not going to work :)
I do not want to touch the viewAllAccounts function because it is used several times in my application.
Is there an easy way to do something after completing a function without changing the function itself?
Thanks in advance!
source share