Yes, ajax:beforea jQuery event that adds / rails triggers, although this is not the latest version ajax:beforeSend. In jQuery, though ( ajax:beforewas around before the JS agnostic changes were tied to rails), you can just connect to it globally using a ajaxSendglobal event , like this:
$(document).bind('ajaxSend', function(e, request, options) {
$('[data-once=true]').something();
});
source
share