animated

英 [ˈænɪmeɪtɪd]   美 [ˈænəˌmetɪd]  

adj.活生生的,有生气的;活泼的,活跃的;愉快的;动画(片)的

v.使…有生气(animate的过去式)

jquery animated选择器 语法

作用::animated 选择器选取当前的所有动画元素。

语法:$(":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>
运行实例 »

点击 "运行实例" 按钮查看在线实例