Skip to content

Instantly share code, notes, and snippets.

@fndiaz
Created June 28, 2013 19:39
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 fndiaz/5887467 to your computer and use it in GitHub Desktop.
Save fndiaz/5887467 to your computer and use it in GitHub Desktop.
loop ajax jquery
<script>
$(document).ready(function(){
function poll() {
$.ajax({
method: "get",
url: "initial/gera_zip",
dataType: "json",
success: function(lista){
for(var i=0, l=lista.length; i<l; i++){
var fila = lista[i];
alert(fila);
for(var j=0, k=fila.length; j<k; j++){
alert(fila[j]);
}
}
}
});
}
setInterval(poll, 500);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment