blob: 7af7004798ad9f75a67774f6dda70be82195a801 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
$("document").ready(function() {
ajaxify_comment_form();
});
function ajaxify_comment_form() {
$("#gComments form").ajaxForm({
dataType: 'json',
success: function(data) {
$("#gComments form").replaceWith(data.form);
ajaxify_comment_form();
if (data.result == "success") {
$.get(data.resource, function(data, textStatus) {
$("#gComments .gBlockContent ul:first").append("<li>"+data+"</li>");
$("#gComments .gBlockContent ul:first li:last").hide().slideDown();
});
$("#gComments form").clearForm();
}
}
});
};
|