if(msg.status == 1){
$('#comment_form').trigger('reset');
var html = ''+msg.info.addtime+'
'+msg.info.content+'
';
//先追加到节点上
$('#comment_continer').prepend(html);
//再将其转换成jquery对象
html = $(html);
$('body').animate({
'scrollTop':'750px'
},1000,function(){
//调用fadeIn方法,但是失败了!
html.fadeIn(1000);
});
}
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
$(html)生成了新元素,并不是你prepend进去的dom,你应该先转换,再插入
你追加进去后,就应该从dom中获取,而不是直接用$(HTML)