Jquery Basics -3-JQuery animation and special effects to achieve

A, jQuery animation library
1, show ([speed, [ easing], [fn]]) display elements, and modify the plurality of style properties i.e. height, width and opacity.
2, hide ([speed, [ easing], [fn]]) hidden elements, and modify the plurality of style properties i.e. height, width and opacity.
3, toggle ([speed], [easing], [fn]) used instead show () and hide () method
4, slideDown ([speed], [easing], [fn]) from under the display element. Just change the height.
5, slideUp ([speed, [ easing], [fn]]) from the top of the display element. Just change the height.
6, slideToggle ([speed], [easing], [fn]) used instead slideDown () and slideUp ()

7, fadeIn ([speed], [easing], [fn]) element fade display only change the opacity to
8, fadeOut ([speed], [easing], [fn]) elements fade out, only change the opacity to
9, fadeTo ([[speed], opacity , [easing], [fn]]) to specify the opacity of the element fade effect, changing only the opacity
10, fadeToggle ([speed, [ easing], [fn]]) is used in place of fadeIn () and fadeOut ()

  


Second, the custom animation
1, grammar: animate (params, speed, callback );

 

2. Stop the animation

◆ Syntax: stop ([clearQueue], [goToEnd])

Telescopic navigation

 


3、判断元素书否处于动画状态
◆if(!$(“element”).is(“:animated”)){//判断元素是否处于动画状态}
4、延时动画
◆ 语法:delay(duration)

 

 

Guess you like

Origin www.cnblogs.com/HiJackykun/p/11203591.html