PranasLu's Blog

2010-05-26

jQuery: Doing Something when any AJAX Starts and Ends

Filed under: Programming — Tags: , — pranaslu @ 15:11

“… jQuery provides us with some built-in methods that allow us to run functions when any AJAX request starts and when any request completes …”

$('#loader').ajaxStart(function () {
	$(this).fadeIn();
});
$('#loader').ajaxStop(function () {
	$(this).fadeOut();
});

 

Source: http://blog.themeforest.net/tutorials/7-things-i-wish-i-had-known-about-jquery/

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: