ajax done fail always example Example: jquery ajax on fail fail: function(xhr, textStatus, errorThrown){ alert('request failed'); }