I have the following code with the purpose of making each .feedcontain
div fade in after an increasing delay. The animation and formatting is perfect, its just that I can't have a this
keyword in the first setTimeout()
parameter.
function goFadeNow(){
var loopdelay=250;
$(".feedcontain").each(function() {
setTimeout('$('+this+').addClass("appeared");',loopdelay);
//$(this).addClass("appeared");
loopdelay=loopdelay+250;
});
}
If I uncomment line 5 and comment line 4, it works but it doesn't have the delay. PS: I do realize that I can't just use this
like a normal variable.