aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

jQuery Hide DIV Elements After 5 Seconds or Some Time Delay

Aug 28, 2013

Here I will explain how to use 
jQuery to hide div elements after 5 seconds or jQuery show or hide div elements after 5 seconds or after some time delay or jQuery remove div after 5 seconds

To implement this we need to write the code like as shown below

<html xmlns="">
<title>jQuery Hide DIV Elements after 10 seconds</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
$(function() {
setTimeout(function() { $("#testdiv").fadeOut(1500); }, 5000)
$('#btnclick').click(function() {
setTimeout(function() { $("#testdiv").fadeOut(1500); }, 5000)
<style type="text/css">
border: 2px solid Red;
color: #008000;
padding: 10px;
width: 400px;
<input type="button" id="btnclick" value="Show DIV" />
<div class="content" id="testdiv" class="">
Hi, Welcome to
It will disappear in 4 seconds!
Live Demo

For live demo check below example

Hi, Welcome to It will disappear in 5 seconds!

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

Other Related Posts

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.