Created
October 24, 2016 21:50
-
-
Save pbexe/5fdef021a5f7a84cfe6c9cb44d9e2f3b to your computer and use it in GitHub Desktop.
Repeated AJAX calls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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