JQuery delay()-function breaks loop?
- by Rakward
I'm trying to fade an element in and out, but with a slight pause in between, it works without the pause, but when I add the pause using the jQuery delay()-function, it just stops;
Here's the code:
$('#headerimage2').each(function(){
for(i=1;i<50;i++){
$(this).fadeOut(1200).delay(1000).fadeIn(1000).delay(1000);
}
});
Why does the delay()-function (both first and second) break the loop?