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 Refresh DIV Content Without Reloading Page using setTimeout Function

Feb 24, 2015

Here I will explain how to use 
jQuery to refresh or reload div content without reloading page for every 10 seconds with example using setTimeout function or jQuery reload or refresh div for every 10 seconds without reloading page or Refresh div content without reloading page using jQuery.

In previous articles I explained Different methods to reload / refresh page using jQueryjQuery reload iframe for every 10 or 5 seconds, jQuery reload or refresh iframe, jQuery different methods to reload or refresh div, Javascript call function for every 5 or 10 seconds using setinterval function and many articles relating to
AngularJS, jQuery, JavaScript and Now I will explain how to use jQuery to refresh or reload div content without reloading page for every 10 seconds with example using setTimeout function.

By using setTimeout function we can refresh div content without reloading page for every 10 seconds using jQuery like as shown below

<script type="text/javascript">
$(function () {
setTimeout(function() { $("#testdiv").fadeOut(1500); }, 10000);
$('#btnclick').click(function() {
setTimeout(function() { $("#testdiv").fadeOut(1500); }, 10000);

If you want to check it in complete example you need to write the code like as shown below

<html xmlns="">
<title>jQuery Refresh 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 5 seconds!

Live Demo

For live demo check below div it will hide after 5 seconds if you want see it again click on button to show div again it will show div without reloading complete page

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


Anonymous said...

Good Article

Give your Valuable Comments

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.