Html sample
Jquery CodeThe content of this div will refresh
take not that we first load the sample.php so that it will run immediately after our page loads. then after 5 seconds. the set interval will run and run every 5 seconds
//load first the sample.php
$( "#theDiv" ).load( "../external/sample.php" );
//after 5 seconds run this code
setInterval(function () {
$( "#imgdiv" ).load( "../external/sample.php" );
}, 5000);
No comments:
Post a Comment