Use of jquery's Hide (), show (), FastIn (), Fastout (), Slideup (), Slidedown ()

Source: Internet
Author: User
    <script type= "Text/javascript" >
       $ (function () {
       //hide,show,fastin,slideup,slidedown,fastout all have two parameters, One is speed, and callback
         $ ("#btn1"). Click (function () {
            $ ("#div1"). Hide (+);//speed velocity, no speed. No parameters 
         });
         $ ("#btn2"). Click (function () {
            $ ("#div1"). Show (//speed); speed, no speed, no velocity
         });
         
           $ ("#btn2"). Click (function () {
            $ ("#div1"). FadeIn ();//speed speed, no speed, no velocity
         });
         $ ("#btn3"). Click (function () {
            $ ("#div1"). Toggle (300);//Toggle Hide (), show ()
         });
          $ ("P"). Click (function () {
         $ ("P"). Slideup ("Fast", function () {///has two parameters, a speed velocity, an animation executes the functions after the
           alert ("111" );
         });
         
         $ ("P"). Slideup (+);
         });
         $ ("#btn1"). Click (function () {
            $ ("#btn1"). Slidedown (());}
         
         
       );
    </script>

The simple jquery code that was used above

<input type= "button" value= "Buttons 1" id= "btn1"/><input type= "button" value= "button 2" id= "btn2"/><input type= " Button "value=" Buttons 3 "id=" Btn3 "/>
<div id=" Div1 "> FDSADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDFD Strange strong dreams of dreaming of the flowers fall off This accounting </div> <p> dreams of Dreaming




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.