Created
August 18, 2010 02:59
-
-
Save derencius/533216 to your computer and use it in GitHub Desktop.
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
var to; | |
$(function() { | |
// initialize timer to update div every 5 seconds | |
to = setTimeout(message_load(), 5000); | |
}); | |
function message_load() { | |
$.get("/messages",function(data) { | |
if (data.VERIFICA_SE_TEM_CONTEUDO) { | |
alert(data.conteudo); | |
} | |
to = setTimeout(message_load, 5000); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment