:animated
:animatedはアニメーションしている要素を検索できるセレクタです。
:animatedで選択できるのはjQueryアニメーションによりアニメーションしている要素です。
次のスクリプトはdivをクリックするとアニメーションが開始するスクリプトです。setIntervalで現在アニメーションが発生している要素の数をカウントし出力しています。
$("div").click(function(){
$(this).animate({
width:"+=200"
},5000);
});
setInterval(function(){
$(".log").text($("div:animated").length);
},100);
jQuery 1.2.0での追加/変更:animatedはjQuery 1.2.0で追加されたセレクタです。
参考URL
:animated Selector | jQuery API Documentation
登録日 : 2013年02月17日 最終更新日 : 2013年2月17日
同じカテゴリー(Selectors)のエントリー
- :disabled
- [attribute~=’value’]
- [attribute|=’value’]
- :animated
- :focus
- :target
- :lang()
- :root
- :only-of-type
- :last-of-type
- :first-of-type
- :nth-last-of-type()
- :nth-of-type()
- :nth-last-child()
- :selected
- :checked
- :file
- :button
- :reset
- :image
- :submit
- :checkbox
- :radio
- :password
- :text
- :input
- :parent
- :has()
- :contains()
- :header
- :lt()
- :gt()
- :eq()
- :odd
- :even
- :last
- :first
- [attributeFilter1][attributeFilter2]
- [attribute*=’value’]
- [attribute$=’value’]
- [attribute^=’value’]
- [attribute!=’value’]
- [attribute=’value’]
- [attribute]
- :not()
- :empty
- :only-child
- :last-child
- :first-child
- 兄弟セレクタ
- 隣接セレクタ
- 子セレクタ
- 子孫セレクタ
- グループセレクタ
- classセレクタ
- idセレクタ
- 要素セレクタ
- ユニバーサルセレクタ