function BlogComment(){ return this; } BlogComment.prototype.showAll = function(form){ if (!form.length) return false; form.find('input[type="hidden"][name="LIMIT"]').val(100); this.sendForm(form); return true; } BlogComment.prototype.sendForm = function(form) { var data = form.serialize() + '&AJAX_LIVE_TAPE=Y'; $.ajax({ url: '/tape/?API=ADD_COMMENT&L=Y', type: "POST", data: data, beforeSend: function(){ }, success: function(response){ var container = form.closest('div.live-tape-comments'); container.html(response); initLikes(); }, dataType: 'html' }); }