What is the difference between Deferred and Promise other than the jQuery versions?
What should I use for my need? I only want to call the fooExecute()
fooExecute()
A promise is something you can set on a deferred object that executes when the deferred collection is complete.
Example from the jQuery documentation:
Go Ready...
Ready...
Here it is in JSFiddle
This runs a function on each div and executes the .promise code when all .each executions are complete.
div
.promise
.each