I'm using jquery load() to load some files.
I need to have a 1 second gap each time the myfuc()
is called inside this load() function.
This is what I did. Currently it doesn't call myfuc()
every 1 second, it calls myfuc()
9 times at the same time.
My requirement is to call myfuc()
when each html file if fully loaded.
or
To call myfuc()
with a 1 second gap
for(i = 1; i < 10; i++){
$('#wrapper' + i ).load('some'+i+'.html', function(index) {
setTimeout(function() {
myfuc();
}, 1000 * (index + 1));
});
}