Give a time delay for a function in Javascript

Hi,
You people might have come across call a javascript function after some delay. I googled and find all incorrect things. Here i am posting the exact thing that needs.

<script type="text/javascript">
 setTimeout(function(){
	your_function_name();
	}, 3000);
</script>

The above function “your_function_name()” will be called after 3 second

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