(064)jquery_动画_delay
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title>animate_stop.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--> <style type="text/css"> div { margin: 10px 0px; } span { position:absolute; width:80px; height:80px; border: solid 1px #ccc; margin: 0px 8px; background-color: Red; color:White; vertical-align:middle } </style> <script type="text/javascript" src="../js/jquery/jquery190.js"></script> <script type="text/javascript"> $(function(){ $("span").animate({left:"100px"},3000,function(){ $(this).animate({width:"250px",height:"250px"},3000,function(){ $("#tip").html("动画执行完成"); }); }); $("#btnDelay").bind("click",function(){ $("span").delay(5000); $("#tip").html("正在延时"); }); }); </script> </head> <body> <h3>调用stop()方法停止当前所有动画效果</h3> <span></span> <input id="btnDelay" type="button" value="延迟" /> <div id="tip"></div> </body> </html>
***万事万物都有裂痕,那是光照进来的地方***

浙公网安备 33010602011771号