Use setTimeout()
:
var delayInMilliseconds = 1000; //1 second
setTimeout(function() {
//your code to be executed after 1 second
}, delayInMilliseconds);
If you want to do it without setTimeout
: Refer to this question.
More Related Contents:
- Passing variable to function in javascript and jQuery
- Reloading a single div in an html page [closed]
- How to invoke animation when redirection in jsf?
- fixing slider on my website [closed]
- Detecting touch screen devices with Javascript
- Display A Popup Only Once Per User
- Wait till a Function with animations is finished until running another Function
- How to load the web page content based on user scrolling
- How to move an iFrame in the DOM without losing its state?
- Prevent form submission with enter key
- focus doesn’t work in IE
- Access event to call preventdefault from custom function originating from onclick attribute of tag
- Recommended JavaScript HTML template library for JQuery? [closed]
- jQuery or Javascript check if image loaded
- Calculate working days between two dates in Javascript excepts holidays
- How to open specific tab of bootstrap nav tabs on click of a particuler link using jQuery?
- jQuery ajax return value [duplicate]
- Find property by name in a deep object
- How do I keep the current tab active with twitter bootstrap after a page reload?
- Add names of the states to a map in d3.js
- How can I prevent a click on a ‘#’ link from jumping to top of page?
- VueJs templating. How to load external templates
- jquery/javascript: function(e){…. what is e? why is it needed? what does it actually do/accomplish?
- Compare two date formats in javascript/jquery
- “Permission denied” with Internet Explorer and jQuery
- How can I dynamically highlight strings on a web page?
- Jquery delay execution of script
- Uncaught NotFoundError: Failed to execute ‘insertBefore’ on ‘Node’: The node before which the new node is to be inserted is not a child of this node
- How to submit checkboxes from all pages with jQuery DataTables
- creating highchart with ajax json data