jQuery API 返回首页目录 | jQuery API 中英文对照版
slideDown(speed, callback)
slideDown(speed,callback)

通过高度变化(向下增大)来动态地显示所有匹配的元素,在显示完成后可选地触发一个回调函数。

这个动画效果只调整元素的高度,可以使匹配的元素以“滑动”的方式显示出来。

返回值:jQuery

参数:

  • speed (String|Number): (可选) 三种预定速度之一的字符串("slow", "normal", or "fast")或表示动画时长的毫秒数值(如:1000)
  • callback (Function): (可选) 在动画完成时执行的函数
 

示例:

$("p").slideDown("slow");

示例:

$("p").slideDown("slow",function(){ alert("Animation Done."); });

 

slideDown( speed, callback )

Reveal all matched elements by adjusting their height and firing an optional callback after completion.

Only the height is adjusted for this animation, causing all matched elements to be revealed in a "sliding" manner.

Return value: jQuery
Parameters:

  • speed (String|Number): (optional) A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).
  • callback (Function): (optional) A function to be executed whenever the animation completes, executes once for each element animated against.

Example:

 $("p").slideDown("slow");  

Example:

 $("p").slideDown("slow",function(){     alert("Animation Done.");   });  
slideDown( speed, callback )

Reveal all matched elements by adjusting their height and firing an optional callback after completion.

Only the height is adjusted for this animation, causing all matched elements to be revealed in a "sliding" manner.

Return value: jQuery
Parameters:

  • speed (String|Number): (optional) A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).
  • callback (Function): (optional) A function to be executed whenever the animation completes, executes once for each element animated against.
 

Example:

 $("p").slideDown("slow");  

Example:

 $("p").slideDown("slow",function(){     alert("Animation Done.");   });  
相关链接
asp之家 | jQuery官方网站 | jQuery中文网 | 电子书作者网站 | 电子书作者blog