fadeOut效果发生/发生后如何刷新页面? 这就是我现在所拥有的,
$.ajax({
type: "POST",
url: 'classes/ajax.login.php',
data: "username=" +username+ "&password="+password,
success: function(msg){
if(msg == 'success'){
$('div#login').fadeOut('normal');
} else {
alert(msg);
}
},
});
答案 0 :(得分:4)
将其添加为回调
$.ajax({
type: "POST",
url: 'classes/ajax.login.php',
data: "username=" +username+ "&password="+password,
success: function(msg){
if(msg == 'success'){
$('div#login').fadeOut('normal', function(){
document.location.href = this.location.href
});
} else {
alert(msg);
}
},
});