ok, so I\'ve got this code:
$(this).find(\'article.loading\').each( function(i) {
var el = this;
setTimeout(function () {
$(el).replaceWith(
It's exactly how Andy McCluggage written. I think something like this could help you.
var speed = 1000;
// init timer and stores it's identifier so it can be unset later
var timer = setInterval(replaceArticle, speed);
var articles = $('article.loading');
var length = articles.length;
var index = 0;
function replaceArticle() {
articles.eq(index).replaceWith($('#dumpster article:first'));
index++;
// remove timer after interating through all articles
if (index >= length) {
clearInterval(timer);
}
}