Refresh a Div container in equal intervals of time

Read {count} times since 2020

Hi this tutorial will help you to refresh a div every 10 seconds. You can change the seconds if you want. For this we are going to use Jquery.

The html of the div container 

jQuery Code

<script src=""></script>
<script>setInterval(function() {$('#refreshdiv').load('divcontainer.html')}, 10000);</script>


This is loading in the div #refreshdiv.

This example will load divcontainer.html in the div #refreshdiv and refresh the div after 10 seconds.
If you want to change the file to load replace divcontainer.html in the jquery code to the file name you want to use.
If you want to change the number of seconds, replace 10000 with the number to refresh(Must be in milliseconds).
If you want help comment on this post.

Show Comments