promise()

このエントリーをはてなブックマークに追加

promise()はPromiseオブジェクトを返すメソッドです。

promise()により生成されたPromiseオブジェクトは、要素の指定されたアニメーションのキューなどが終了した際にresolved()が実行されます。

$(".target").animate({
	"width":"100px"
});
$(".target").promise().done(function(){
	alert("finish!!");
});

sample

jQuery 1.6.0での追加/変更

promise()はjQuery 1.6.0で追加されたメソッドです。

参考URL

.promise() | jQuery API Documentation

登録日 : 2013年04月04日 最終更新日 : 2013年4月4日

同じカテゴリー(Deferred)のエントリー

検索

スポンサードリンク

バージョン

リファレンス