I want to reload my table.php every 3 seconds. I wrote a working code, but when I call the page manual, or refresh it manually, it starts to load my content after 3 seconds, and not instantly. Anyone now, how to call first table.php, and refresh after it every 3 seconds like in my code below?
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
setInterval(function () {
$('#show').load('table.php')
}, 3000);
});
</script>