jQuery ?? ?????
?? ?????
slideDown(speed,callback)
?? ??(??? ??)? ?? ???? ?? ??? ?????? ???? ????? ??? ??? ? ?? ??? ??????.
? ????? ??? ??? ??? ???? ???? ??? "????" ???? ????? ???.
speed(???|??): (?? ??) ?? ??? ? ?? ??("??", "??" ?? "??") ? ??? ??? ?? ????? ??? ???? ??? ?(?: 1000)
SlideUp(speed, callback)
??? ??(?? ??)?? ???? ?? ??? ?????? ??? ????? ???? ??? ? ?? ??? ??????.
? ????? ??? ??? ??? ???? "????" ???? ???? ??? ?? ? ????.
???? SlideDown? ?????.. ??? ??? ?????
slideToggle(speed, callback)
?? ??? ?? ???? ?? ??? ???? ???? ????? ??? ??? ? ??? ?? ??.
? ????? ??? ??? ??? ???? ???? ??? "????" ???? ???? ??? ? ????.
<!DOCTYPE html> <html> <head> <title>php.cn</title> <meta charset="utf-8" /> <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script> <script> function f1(){ //隱藏 hidden $('div').slideUp(3000); } function f2(){ //顯示 show $('div').slideDown(3000); } function f3(){ $('div').slideToggle(2000); } </script> <style type="text/css"> div {width:300px; height:200px; background-color:blue;} </style> </head> <body> <div></div> <input type="button" value="隱藏" onclick="f1()" /> <input type="button" value="顯示" onclick="f2()" /> <input type="button" value="開關(guān)" onclick="f3()" /> </body> </html>