animated
英 [??n?me?t?d]? ?美 [??n??met?d]??
adj.活生生的,有生氣的;活潑的,活躍的;愉快的;動畫(片)的
v.使…有生氣(animate的過去式)
jquery animated選擇器 語法
作用::animated 選擇器選取當(dāng)前的所有動畫元素。
語法:$(":animated")
jquery animated選擇器 示例
<html> <head> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ function aniDiv(){ $("#box").animate({width:300},"slow"); $("#box").animate({width:100},"slow",aniDiv); } aniDiv(); $(".btn1").click(function(){ $(":animated").css("background-color","blue"); }); }); </script> <style> div { background:#98bf21; height:40px; width:100px; position:relative; margin-bottom:5px; } </style> </head> <body> <div></div> <div id="box"></div> <div></div> <button class="btn1">Mark animated element</button> </body> </html>
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例