Create a delay between function calls using Jquery

In this example, we’ll mainly use jQuery’s awesome function-chaining ability by running the .fadeOut().fadeIn() and .delay() functions together on the same element. This is very similar to the setTimeout() function but without allowing us to easily interrupt the delay.

Step_09b

$('#' + id).hide().fadeIn('slow').delay(1500).fadeOut('slow');
Advertisements

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