Can't find reason why xhr is not defined
问题 I am getting an uncaught reference error: XHR is not defined in my coffeescript below. jQuery -> # Create a comment $(".comment-form") .on "ajax:beforeSend", (evt, xhr, settings) -> $(this).find('textarea') .addClass('uneditable-input') .attr('disabled', 'disabled'); .on "ajax:success", (evt, data, status, xhr) -> $(this).find('textarea') .removeClass('uneditable-input') .removeAttr('disabled', 'disabled') .val(''); $(xhr.responseText).hide().insertAfter($(this)).show('slow') # Delete a