我想從AJAX調用fadeIn
我的網頁上的內容,但是當我使用此代碼$('#sub_container').html(content).fadeIn();
它不工作,即使我將動畫速度設置爲超慢(slow(5000)
)
$('.create').click(function(){
loadingimg();
document.title = 'Create Message';
$.ajax({
url: 'create.php',
dataType: 'html',
success: function(content){
$('#sub_container').html(content);
// $('#sub_container').html(content).fadeIn(); <- Fails
}
});
});
重複:http://stackoverflow.com/questions/183638/making-my-ajax-updated-div-fade-in,http://stackoverflow.com/questions/8262573/ajax-jquery-fade-in -of-php-content –