divの内容をajaxで変更したいのですが、非表示にする前に、変更後にjQueryアニメーションで表示します。
私の現在のコード:
$(document).on("click", ".menuItem", function(){
var contentName = $(this).attr("name");
$( "#content > div" ).hide(1000, function(){
$.ajax({ type: "GET",
url: contentName,
dataType: 'html',
success : function(responseText){
$("#content").html(responseText);
$("#content").show(1000);
}
});
});
});
しかし、html メソッドが呼び出されると、新しいコンテンツが突然表示されるため、機能していません。この問題を解決する方法はありますか?
前もって感謝します!
リチャード