Skip to content

Instantly share code, notes, and snippets.

@taddeimania
Created April 11, 2016 18:43
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 taddeimania/e4c3143db1e452679f80da2141ae2f2c to your computer and use it in GitHub Desktop.
Save taddeimania/e4c3143db1e452679f80da2141ae2f2c to your computer and use it in GitHub Desktop.
<script type="application/javascript">
$( document ).ready(function() {
var callAgain = function(stuff){
// Do work here
// Why not make an ajax call and replace an element on the page?
// Delay another call in 10 seconds
setTimeout(function(){
callAgain(stuff);
}, 10000);
};
callAgain("something");
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment