, AJAX , - :
$(document).on("ajax:success", "form[data-remote]", function(e, data, status, xhr) {
$('html').scrollTop(0);
});
, , data-remote, AJAX, , . on .
jQuery Documentation, ajaxSuccess:
$(document).ajaxSuccess(function() {
$( ".log" ).text( "Triggered ajaxSuccess handler." );
});
, ajax:
var jqxhr = $.ajax( "example.php" )
.done(function() {
alert( "success" );
})
.fail(function() {
alert( "error" );
})
.always(function() {
alert( "complete" );
});