jQuery EffectsLesson 12Free preview
jQuery Callback
This lesson is part of jQuery · All levels
Summary
Callback is a function that is executed after a method is completed, especially on animation effects. With the callback, you can set the sequence of actions so they don't collide. This pattern replaced the use of predictable timers and the tendency for them to slip.
Key points
- Callback is executed after the effect or operation is completed
- Callback is written as the last parameter of a method
- Callback ensures the code execution sequence remains correct
- Manual timers are prone to miss because the duration of the effect can vary between devices
- Callbacks can be constrained to the order of some effects
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.