setTimeout(function() { $('#foo').fadeOut(); }, 5000);
The 5000 is five seconds in milliseconds.
More Related Contents:
- How can I convert this from jQuery to standard javascript?
- Why does my JavaScript code receive a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” error, while Postman does not?
- How do I detect a click outside an element?
- What’s the difference between ‘$(this)’ and ‘this’?
- Detect element content changes with jQuery
- Only detect click event on pseudo-element
- How to differentiate single click event and double click event?
- jQuery difference between change and click event of checkbox
- How to unbind a listener that is calling event.preventDefault() (using jQuery)?
- Handling key-press events (F1-F12) using JavaScript and jQuery, cross-browser
- JQuery document.ready vs Phonegap deviceready
- JavaScript/jQuery check broken links
- jquery, find div class name at a certain position while scrolling
- How to prevent simultaneous logins of the same user with Firebase?
- How to reset the bootstrap modal when it gets closed and open it fresh again?
- Is it any limit for POST data size in Ajax?
- How can I find the length of a number?
- How to stop an animated gif from looping
- Get image preview before uploading in React
- How do I select the innermost element?
- Detect browser wrapped lines via javascript
- Send form data using ajax
- How to interpret documentation for optional JavaScript parameters [duplicate]
- focus on next tabindex of HTML element onEnter keypress by JQuery
- Automatically scroll down chat div
- Running javascript after page is fully rendered
- How to return an array from an AJAX call?
- How to bind both Mousedown and Touchstart, but not respond to both? Android, JQuery
- Find and replace nth occurrence of [bracketed] expression in string
- JQuery Modal Boxes and Iframe