jQuery - effect of "preloading" (setinterval)? -


i have code:

   jquery(img).each(function() {         jquery(this).animate({opacity: 0});           jquery(this).animate({opacity: 1},4000);     });   

the code changes images opacity 0 , 1. point happens images while want work 1 image @ time.

any ideas how achieve this?

okay, here's stab @ it.

var duration = 1000; $('img').css('opacity', 0).each(function(i) {     $(this).delay(i*duration).animate({opacity: 1}, duration); }); 

demo demo demo


Comments