One of the lovely things about jQuery is it makes it ridiculously easy to animate page elements. Whereas you previously had to mess around with setTimeout()
or setInterval()
, and lots of JavaScript code, with jQuery you can work wonders with just a line or two of code.
In this tutorial we’ll cover some of the more common effects you can achieve with jQuery. We’ll look at:
- Fading elements in and out
- Showing and hiding elements
- Sliding elements up and down
- Animating any numeric CSS property
- Creating an animation sequence
- Inserting delays into an animation, and
- Stopping animations.
Ready? Let’s get going!