I'm trying to
loop over each DIV in DOM and apply an effect (let's say fadeOut()
), with time spaces between each one.
From some reason this thing doesn't want to work.
var stupid = -1000;
return_stupid = function(){
return stupid+=1000;
}
$(function(){
$("div").not("#wrapper").delay(return_stupid()).queue(function(){
$(this).fadeOut("slow");
$(this).dequeue();
});
});
edit: Well, I found the issue. return_stupid() is only called ONCE because it's not a .each() statement.
Well, I don't wanna use each(), it's eating the memory!
Any solution?