Files
gallery3/modules/comment/js/comment.js
T

22 lines
588 B
JavaScript
Raw Normal View History

2008-11-16 07:14:12 +00:00
$("document").ready(function() {
ajaxify_comment_form();
});
function ajaxify_comment_form() {
$("#gComments form").ajaxForm({
2008-12-25 01:34:17 +00:00
dataType: "json",
success: function(data) {
if (data.form) {
2008-12-31 03:29:25 +00:00
$("#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();
});
2008-11-16 07:14:12 +00:00
}
}
});
};