Skip to content

Instantly share code, notes, and snippets.

@davidsword
Created September 14, 2016 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidsword/33e9411b733f5697d3499afc0d9d2b81 to your computer and use it in GitHub Desktop.
Save davidsword/33e9411b733f5697d3499afc0d9d2b81 to your computer and use it in GitHub Desktop.
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type='text/javascript'>
$(document).ready(function() {
setInterval(function() {
var url = 'http://full_url_of_this_page.html';
$('#refresh_zone-wrapper').load(url + ' #refresh_zone'); //note: space between intentional
}, 2000); // milliseconds
});
</script>
</head>
<body>
<div id="refresh_zone-wrapper">
<div id="refresh_zone">
<?= rand(1,9999) ?>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment