Home >Web Front-end >JS Tutorial >jQuery native animation effect_jquery

jQuery native animation effect_jquery

WBOY
WBOYOriginal
2016-05-16 15:50:491060browse

1. Method:

show:显示选中元素。
hide:隐藏选中元素。
toggle:显示或隐藏选中元素。
fadeIn:将选中元素的不透明度逐步提升到100%。
fadeOut:将选中元素的不透明度逐步降为0%。
slideDown:垂直向下滑动显示选中元素。
slideUp:垂直向上滑动隐藏当前元素。
slideToggle:垂直向上或向下滑动的形式折叠或展开选中元素。

2. Grammar:  

 $(selector).Method name ([speed], [callback]);

 --speed: optional, indicating speed. Default is "normal".

Available values ​​

Milliseconds (e.g. 1500)
"slow"
"normal"
"fast"   
-- callback: optional, callback function.

3. Call:

  $(".toggle").toggle();

  $(".toggle").toggle(250);

  $(".toggle").toggle('fast');

The above is the entire content of this article, I hope you all like it.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn