This causes a nice blackhole on a webpage which can suck other webpages to it…..
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script> var auto_refresh = setInterval( function () { $('#load_tweets').load('record-count.php').fadeIn("slow"); }, 5000); // refresh every 5000 milliseconds </script> <div id="load_tweets"> </div> |
record-count.php
1 2 3 4 5 |
<?php echo "This is being read every 5 seconds"; ?> |
with call back when loaded
1 2 3 4 5 |
$('#load_tweets').load('../../database_admin/waiting_for_data.php', function() { alert( "Load completed." ); }).fadeIn("slow"); |