Results 1 to 1 of 1
Mar 13, 2013, 14:51 #1
- Join Date
- Jun 2012
- 0 Post(s)
- 0 Thread(s)
How do I specify a callback function to be executed once for a collection?
I want to be able to execute a callback one time once my collection of jQuery objects are finished with their .animate() methods. How can I specify this function?
In other words, I want to have a callback for each jQuery object in my collection, but also, I need to have a callback execute once after all the individual jQuery elements have finished all their business. How would I go about doing this?
Hoping someone can provide this answer before I find it myself elsewhere. The odds are very slim but I'll keep my fingers crossed.
Edit: Okay, it looks like I am going to need to use the .promise() method. Still don't know exactly how yet. If somebody could provide an example before I can figure it out(unlikely but possible) that would be great.
Edit #2: Okay, I figured it out. I use the .promise() method along with the .done() method. Thanks guys. I appreciate it. You guys can all go back to sleep now.