Skip to content

Instantly share code, notes, and snippets.

@pbexe
Created October 24, 2016 21:50
Show Gist options
  • Save pbexe/5fdef021a5f7a84cfe6c9cb44d9e2f3b to your computer and use it in GitHub Desktop.
Save pbexe/5fdef021a5f7a84cfe6c9cb44d9e2f3b to your computer and use it in GitHub Desktop.
Repeated AJAX calls
(function worker() {
$.ajax({
url: './ajax/',
success: function(data) {
// Some jam
},
complete: function(data) {
setTimeout(worker, 2000);
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment