jQuery(document).ready(function(jQuery) { var __cancel = $('#cancel-comment-reply-link'), __cancel_text = __cancel.text(), __list = 'comment-list'; $(document).on("submit", "#commentform", function() { $.ajax({ url: theme.ajaxurl, data: $(this).serialize() + "&action=ajax_comment", type: $(this).attr('method'), beforeSend: showAlert(JSON.parse('{"status":2,"msg":"提交中...."}')), error: function(request) { showAlert(JSON.parse(request.responseText)); }, success: function(data) { $('textarea').each(function() { this.value = '' }); var cancel = document.getElementById('cancel-comment-reply-link'), temp = document.getElementById('wp-temp-form-div'), respond = document.getElementById('respond'), post = document.getElementById('comment_post_ID').value, parent = document.getElementById('comment_parent').value; $text = $(data); if (parent != '0') { $children = $('