次のように開くいくつかのダイアログがあります。
$("#dialog").load("/ajax/content.php");
$("#dialog").dialog({....});
ダイアログの開始をアニメーション化するグローバルイベントモニター
$(document).on("dialogOpen", ".dialogClass", function() {
var parent = $(this).parent();
parent.css("left","-768px");
parent.animate({
left:0
}, speed, "easeOutBounce");
}
一部のページでは、これはかなり途切れ途切れに見えます。ダイアログが ajax 呼び出しの結果を読み込んでレンダリングしているときに、これらのアニメーションが発生していると思われます。次のような他のすべてのアニメーションが完了するまで一時停止できる方法はありますか?
$(document).on("dialogOpen", ".dialogClass", function() {
//Wait until other rendering is complete prior to executing further
var parent = $(this).parent();
parent.css("left","-768px");
parent.animate({
left:0
}, speed, "easeOutBounce");
}