var next = document.body.firstChild; function closers(){ next = next.nextSibling; if(next !== null)setTimeout(closers); }