When removing #gCommentForm I forgot to update the jQuery selectors used here. In place commenting works again.

This commit is contained in:
Chad Kieffer
2008-11-23 20:17:02 +00:00
parent 3728136fce
commit 9139872c8d
+5 -5
View File
@@ -3,15 +3,15 @@ $("document").ready(function() {
});
function ajaxify_comment_form() {
$("#gCommentForm").ajaxForm({
$("#gComments form").ajaxForm({
complete: function(xhr, statusText) {
$("#gCommentForm").replaceWith(xhr.responseText);
$("#gComments form").replaceWith(xhr.responseText);
if (xhr.status == 201) {
$.get(xhr.getResponseHeader("Location"), function(data, textStatus) {
$("#gComment div.gBlockContent ul:first").append(data);
$("#gComment div.gBlockContent ul:first li:last").hide().slideDown();
$("#gComments div.gBlockContent ul:first").append(data);
$("#gComments div.gBlockContent ul:first li:last").hide().slideDown();
});
$("#gCommentForm").clearForm();
$("#gComments form").clearForm();
}
ajaxify_comment_form();
}