O'Reilly logo

Mastering jQuery by Alex Libby

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

Applying custom easing functions to effects

If someone mentions the word "easing" to you, I'll bet one of two things will happen:

  • You will most likely think that you'll need to use jQuery UI, which has the potential to add a fairly significant chunk of code to the page
  • You'll run away, at the thought of having to work out some horrendous math!

The irony here though, is that the answer to both could be yes and no (at least to the first part of the second comment). Hold on – how come?

The reason for this is that you most certainly don't need jQuery UI to provide special easing functions. Granted, if you are already using it, then it would make sense to use the effects contained within. While you might have to work out some maths, this would only be ...

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