我想用ajax chage 一个div 内容,但是在隐藏它之前和改变之后,用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 方法时,新的内容突然出现。有没有办法解决这个问题?
提前致谢!
理查德