$("document").ready(function() { ajaxify_comment_form(); }); function ajaxify_comment_form() { $("#gComments form").ajaxForm({ dataType: 'json', success: function(data) { if (data.result == "success") { $.get(data.resource, function(data, textStatus) { $("#gComments .gBlockContent ul:first").append("