Skip to content

Instantly share code, notes, and snippets.

@igmoweb
Last active December 4, 2015 18:04
Show Gist options
  • Select an option

  • Save igmoweb/cbfd94d6e571dda2882c to your computer and use it in GitHub Desktop.

Select an option

Save igmoweb/cbfd94d6e571dda2882c to your computer and use it in GitHub Desktop.
checkURLs: function( urls ) {
var percentage;
if ( urls.length == 0 ) {
finiquitado();
return;
}
// Le robamos una URL a esto
var url = urls.shift();
$.ajax({
url: ajaxurl,
data: { /** Mis datos, chaval **/ }
})
.success(function (data) {
// Cosas que hacer por aquí, nigga
window.setTimeout( function() {
// Espérate 6 segundos y otra vez
self.checkURLs( urls );
}, 6000 );
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment