Skip to content

Instantly share code, notes, and snippets.

@davidsword
Created September 14, 2016 21:37
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/5569a16fcedb04ea9de93342e6fe221b to your computer and use it in GitHub Desktop.
Save davidsword/5569a16fcedb04ea9de93342e6fe221b to your computer and use it in GitHub Desktop.
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
// reload #dynamic_stats of this page every 30 seconds
// this will hold and change the results of top
// stored in spans: #source_*
// which is read by the gauges outside of #dynamic_stats
$(document).ready(function() {
setInterval(function() {
var url = 'http://.../this_file.php';
$('#dynamic_stats-wrapper').load(url + ' #dynamic_stats');
}, 60000);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment