评论回复

This commit is contained in:
joyqi
2013-10-16 16:49:55 +08:00
parent 79fcf099c7
commit e3491d87d6
2 changed files with 13 additions and 6 deletions

View File

@@ -7,7 +7,10 @@
$(document).ready(function() {
<?php if ($notice->highlight): ?>
//增加高亮效果
$('#<?php echo $notice->highlight; ?>').effect('highlight', '#AACB36', 1000);
$('#<?php echo $notice->highlight; ?>').addClass('nohover')
.effect('highlight', '#AACB36', 1000, function () {
$(this).removeClass('nohover');
});
<?php endif; ?>
//增加淡出效果

View File

@@ -242,12 +242,14 @@ $(document).ready(function () {
$(this).parents('.comment-reply').remove();
});
$('textarea', form).focus();
var textarea = $('textarea', form).focus();
form.submit(function () {
var t = $(this), tr = t.parents('tr');
$.post
$.post(t.attr('action'), t.serialize(), function (o) {
t.remove();
});
return false;
});
@@ -310,15 +312,17 @@ $(document).ready(function () {
+ comment.mail + '</a></span>' : '')
+ (comment.ip ? '<br /><span>' + comment.ip + '</span>' : '');
$('.comment-meta', oldTr).html(html);
$('.comment-meta', oldTr).html(html)
.effect('highlight', '#AACB36');
$('.comment-content', oldTr).html('<p>' + comment.text + '</p>');
oldTr.data('comment', comment);
$.post(t.attr('action'), comment, function (o) {
$('.comment-content', oldTr).html(o.comment.content);
$('.comment-content', oldTr).html(o.comment.content)
.effect('highlight', '#AACB36');
});
oldTr.show().effect('highlight', '#AACB36');
oldTr.show();
tr.remove();
return false;