我想要做一些效果,例如fadeIn
页面,一旦我得到ajax响应。 我想这一点,jquery ajax成功淡入淡出效果
$.ajax({
type: "post",
url: actionLink,
cache: false,
data: ....someData....,
success: function(data) {
$(".response").fadeOut(100);
$(".response").html(data);
$(".response").fadeIn(500);
}
});
这是工作,但数据显示第一和用500ms的淡入效果获取数据的闪光灯,但我需要直接与淡入淡出效果得到加载的数据。
我甚至尝试过Fade out a div with content A, and Fade In the same div with content B,但我仍然遇到同样的问题。
我也试过:
$(".response").fadeOut(100).hide();
$(".response").show().html(data).fadeIn(500);
还是一样。我该如何解决?
嗨,谢谢你的回复。试过了。还是一样。第一个数据显示并开始fadeIn – Max