Callbacks: What to do when the animation ends


show more Callbacks: What to do when the animation ends provides you with in-depth training on Web. Taught by Joe Chellman as part of the jQuery for Web Designers show less
please wait ...

Callbacks: What to do when the animation ends

See animation looks pretty good. Everything's going to the right place. But it's still missing something. When the animation completes, these things are still left over. It would be nice to get rid of those as soon as the animation is done. In this movie, we're going to look at call backs which are a generalized way of dealing with events in the middle of other things you're trying to do. So looking back at the code, here is my ghost which I'm animating. So at first I have my object with all the things I want to animate. Then I show the duration.

I could plug-in an easing function here if I wanted to. In fact, let's just do that for fun. And then I can add a call back, so what is a call back exactly? A call back is a function that you call at a certain time. Different methods might offer multiple call backs or just one, and they'll fire it different times in response to different parts of the original function. So the original function in this case is animate, and it offers o...

Callbacks: What to do when the animation ends
Video duration: 3m 27s 1h 42m Intermediate

Viewers:

Callbacks: What to do when the animation ends provides you with in-depth training on Web. Taught by Joe Chellman as part of the jQuery for Web Designers

Subject:
Web
Software:
jQuery
Author:
please wait ...