. Animate (Params,[speed],[easing],[fn])
params,[speed],[easing],[fn]options,number/string,string,functionv1.0
Params: A set of style properties and their values that contain the animated and final values
Speed: A string of three predetermined speeds ("slow", "normal", or "fast") or a millisecond value that represents the duration of the animation (for example: 1000)
Easing: The name of the erase effect to use (requires plug-in support). The default jquery provides "linear" and "swing".
fn: The function that executes when the animation is complete, once for each element.
The key to this function is to specify the animation form and the result style Property object. Each property in this object represents a style property that can vary (such as "height", "top", or "opacity"). Note: All specified properties must be in camel form, such as marginleft instead of Margin-left.
The value of each property indicates how much of this style attribute to the end of the animation. If it is a numeric value, the Style property will be graduated from the current value to the specified value. If you are using a string value such as "Hide," "Show," or "toggle," the default animated form is called for the property.
$ ("#go"). Click (function () {
$ ("#block"). Animate ({
Width: "90%",
Height: "100%",
FontSize: "10em",
Borderwidth:10
}, 1000);
});
$aaron. Animate ({
Height: ' 50 '
}, {
duration:2000,
Each animation will be called
Step:function (now, FX) {
$aaron. Text (' Height change value: ' +now ')
}
})
. Stop ([Clearqueue], [jumptoend])
. Stop (); Stop the current animation, click on the pause to continue to start
. Stop (true); If the same element calls multiple animation methods, the animation that has not yet been executed is placed in the effect queue of the element. These animations do not start until the first one is finished. When you call. Stop (), the next animation in the queue starts immediately. If the Clearqueue parameter provides a true value, the rest of the animation in the queue is deleted and will never run
. Stop (True,true); The current animation stops, but the CSS properties on the element are immediately modified to the target value of the animation
- Stop (): Only the first animation is stopped, the second third one continues
- Stop (TRUE): Stops the first, second, and third animations
- Stop (true ture): Stops the animation and jumps directly to the final state of the first animation
jquery Summary 06-animated Event 04-Custom Animation