O'Reilly logo

jQuery Essentials by Troy Miles

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating custom effects

jQuery doesn't include many effects; out of the box, there are just the hide and show, fade in and fade out, and slide methods. If these were all it could include, it would probably not have been worth including them in the library. Luckily, jQuery lets us create our own animations.

.animate()

Understanding the .animate() method is the key to understanding how to create custom effects. While the other methods are important, none of them do anything until you get the animate method working, which isn't too hard luckily, especially if you keep in mind how the animate property actually works. It works by manipulating the value of CSS properties. Most—but not all—properties can be manipulated. Let's take a quick look in order ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required