Skip to content

Ajax events

Attila Györffy edited this page Jul 28, 2015 · 2 revisions

Custom events fired during "data-remote" requests

Forms and links marked with "data-remote" attribute are submitted with jQuery.ajax(). In addition to normal jQuery Ajax "global" events, these custom events are fired from those DOM elements:

NOTE: These are not exactly in line with the arguments defined in jquery-ujs

event arguments when?
ajax:success event, data, status, xhr after completion, if the HTTP response was successful
ajax:error event, xhr, status, statusText after completion, if the server returned an error
Clone this wiki locally