codeandcloud
codeandcloud

Reputation: 55248

Easing functions in jQuery

This question sounds too trivial, but I could not find the answer anywhere.

I was browsing through the jQuery docs and saw some signatures like this.

.show( [duration,] [easing,] [callback] )

and

.animate( properties, [duration,] [easing,] [complete] )

At both places, easing is defined as

easing A string indicating which easing function to use for the transition.

But I don't see any documentation showing all the easing functions in jQuery.
From where will I get all the easing functions for jQuery?

Upvotes: 12

Views: 10954

Answers (2)

Marc
Marc

Reputation: 9354

The standard library only has swing and linear, however, jquery UI brings in a ton more

Upvotes: 18

James Montagne
James Montagne

Reputation: 78690

From the easing section of the animate doc:

Easing The remaining parameter of .animate() is a string naming an easing function to use. An easing function specifies the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing, and one that progresses at a constant pace, called linear. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.

http://api.jquery.com/animate/

Upvotes: 5

Related Questions