Skip to content

Instantly share code, notes, and snippets.

@vjk2005
Created April 28, 2013 21:28
Show Gist options
  • Save vjk2005/5478484 to your computer and use it in GitHub Desktop.
Save vjk2005/5478484 to your computer and use it in GitHub Desktop.
g.e-h.org loader
var s = document.createElement( 'script' )
s.src = 'http://code.jquery.com/jquery-1.8.0.min.js'
document.body.appendChild( s ) // load jQuery
var current=6, target = 150;
function load( url ) {
$.get( url, function( data ) {
$( '#i4' ).before( $( '#i3', data ).html() )
current++
if( current < target) {
setTimeout( function() { load( $('#next', data).attr('href') ) }, 20000 )
} else {
console.log('downloaded!')
}
})
}
load( $('#next').attr('href') ) //start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment