summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--themes/default/js/comment.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/themes/default/js/comment.js b/themes/default/js/comment.js
index 5d2ed599..5cb236e8 100644
--- a/themes/default/js/comment.js
+++ b/themes/default/js/comment.js
@@ -4,9 +4,8 @@ $("document").ready(function() {
function ajaxify_comment_form() {
$("#gCommentForm").ajaxForm({
- target: "#gCommentForm",
complete: function(xhr, statusText) {
- ajaxify_comment_form();
+ $("#gCommentForm").replaceWith(xhr.responseText);
if (xhr.status == 201) {
$.get(xhr.getResponseHeader("Location"), function(data, textStatus) {
$("#gComment div.gBlockContent ul:first").append(data);
@@ -15,6 +14,7 @@ function ajaxify_comment_form() {
);
$("#gCommentForm").clearForm();
}
+ ajaxify_comment_form();
}
});
}