In this post, we will see how to resolve jQuery callback after function is complete
Question:
I have a script that has a lot of height animations. So i figured I could juste make one function with the animation and call it whenever I want. The thing is, when the function is complete I have various things that can be done.So this is the solution I have so far that works well but that isn’t satisfying (hard to know which condition applies in which case):
Here are, from the top of my head, some attempts I tried (and some were even found in Stack Overflow) but didn’t work in my case:
Best Answer:
You can pass your code as a callback function, and call it fromcompletion:
If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com
Leave a Review