Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var instanse = false;
- function Log () {
- this.update = updateLog;
- }
- function updateLog(){
- if(!instanse){
- instanse = true;
- $.ajax({
- type: "GET",
- url: "log.txt",
- success: function(data){
- $('#log').text(data);
- instanse = false;
- }
- });
- } else {
- setTimeout(updateLog, 1000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement