andrew4582

JQuery ajax methods

Nov 6th, 2011
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         $("#app_loading").ajaxStart(function () {
  2.             $(this).fadeIn();
  3.         });
  4.         $("#app_error").ajaxStart(function () {
  5.             $(this).hide();
  6.         });
  7.         $("#app_error").ajaxError(function (event, request, settings) {
  8.             $(this).html(
  9.                 "Error: [" + request.status + "] - "
  10.                 + request.statusText + " -  url: "
  11.                 + settings.url
  12.             );
  13.  
  14.  
  15.             $(this).fadeIn();
  16.         });
  17.         $("#app_loading").ajaxStop(function () {
  18.             $(this).hide();
  19.         });
Advertisement
Add Comment
Please, Sign In to add comment