/ Published in: jQuery

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('#message').ajaxSend(function(request, settings){ $(this).html('<p class="notice">Starting request at ' + settings.url + '<span>x</span></p>').toggleClass('visible', 1000); log(request); log(settings); }); $('#message').ajaxSuccess(function(request, settings){ $(this).html('<p class="success">Successful Request <span>x</span></p>').toggleClass('visible', 1000); }); $('#message').ajaxComplete(function(request, settings){ $(this).html('<p class="notice">Request Complete <span>x</span></p>').toggleClass('visible', 1000); }); $('#message').ajaxError(function(request, settings){ $(this).html('<p class="error">Error requesting page ' + settings.url + '<span>x</span></p>').toggleClass('visible', 1000); }); a $('#message').ajaxStart(function(){ //$(this).show(500, callback); //$('#loading').fadeIn(); }); $('#message').ajaxStop(function(){ //$(this).fadeOut(); });
Comments
