Introduction to the use of jquery animated animate methods
The function used to create the custom animation.
return value: JQuery animate (params, [duration], [easing], [callback])
If you are using a string value such as "Hide," "Show," or "toggle," the default animated form is called for the property. Paramsoptions a group of packages
Contains a collection of style attributes and their values as animated and final values
Params object {}, note: All specified properties must be in camel form, for example with MarginLeft instead of margin-left, if you are using "hide",
A string value such as "show" or "toggle", the default animated form is called for the property.
Duration (optional) 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 (optional) the name of the erase effect to use for string (requires plug-in support). Default jquery provides "linear" and "swing"
Callback (optional) function to execute when the animation is complete
0. Stop the animation
1 2 3 |
if ($ (' swaplist,.mainlist '). Is (': Animated ')) {$ ('. Swaplist,.mainlist '). Stop (true, true);} |
Animate instances:
1. Several different attributes of the DIV element change after clicking the button
1 2 3 4 5 6 7 8 |
$ ("#go"). Click (function () { & nbsp |