Today,I am going to share one interesting snippet with you.You might had seen some websites which are providing live updates.Today,I will be showing you something similar to it.
HTML Code [It updates every 1 second & you can put loading image till content loading]:
<div id="content"><img alt="" src="load.gif" /></div>
Javascript Code:
<script type="text/javascript">
var auto_refresh = setInterval(
function ()
{
$('#content').load('content.php').fadeIn("fast");
}, 1);
</script>
Hope you guys like this!
Leave a Reply