php ajax局部刷新div,ajax局部刷新指定的DIV失败了!快来帮帮我呀····

大神帮我看看这段评论代码,怎么局部刷新DIV?div的ID是:comment-list

修改很多次,每次评论后 弹出提示框说评论成功,必须要手动刷新页面才显示新的评论,我该怎么做呢?可以详细点吗?

//评论

comment.find('.dingcai').click(function(){

var self = $(this).parent(),

id = self.data('id'),

box = self.parents('.main-list').find('.joke-list-comment');

if(flag == -1){

App.request({

url : '/xiaohua/getreview',

data : {id : id,p : 1},

success: function(result){

var re = result || {};

if(re.err){

var obj = {list : re.msg || {}},

html = null,

mainList = self.parents('.main-list'),

godreplyID = mainList.find('.godreply').data('id');

obj.islogin = _this.isLogin();

obj.godreplyID = godreplyID || 0;

html = template.compile(reply)(obj);

mainList.append(html);

mainList.find('.joke-list-comment .comment_packUp').on('click',function(){

$(this).parents('.joke-list-comment').hide();

flag = 1;

});

mainList.find('.loginClickHref').on('click',function(){

_this.loginDialog();

});

//评论

mainList.find('.comment-submit').on('click',function(){

var form = $(this).parent(),

data = form.serializeObject();

data.id = id;

if(!data.content || data.content.length > 140){

App.alert('回复内容不能为空!');

return;

};

App.request({

url : '/ajax/review',

data : data,

success : function(result){

var re = result || {};

if(re.err){

form.find('.comment-input-text').val('');

App.alert('评论成功!');

return;

var obj = re.msg[0],

ul = mainList.find('.comment-list'),

li = ul.find('li'),

is_reply = li.eq(0).hasClass('nocomment'),

index = is_reply ? 1 : li.size() + 1;

var _html = '

\
\

'+obj.user_info.username+'\

'+obj.user_info.username+'

\

'+obj.content+'

\
\
\

'+index+'楼\

0\

回复\

\';

if(is_reply){

ul.html(_html);

}else{

if(li.size() == 5){

li.eq(-1).remove();

ul.prepend(_html);

var index = 6;

for(var i=1; i<=li.size(); i++){

ul.find('.comment-ding span').eq(i-1).text((index = index-1)+'楼');

};

return;

};

ul.prepend(_html);

};

}else{

App.alert(re.msg);

};

}

});

});

//点赞

mainList.on('click','.comment-ding-icon',function(){

var self = $(this),

id = self.data('id');

_this.commentDing(self,id);

});

//回复

mainList.on('click','.comment-reply',function(){

if(!_this.isLogin()){

_this.loginDialog();

return;

};

_this.reply($(this));

});

}else{

//info.show().html(re.msg);

};

flag = 0;

}

});

};

if(flag == 0){

box.hide();

flag = 1;

}else if(flag = 1){

box.show();

flag = 0;

};

});