Alexander Petri schrieb: > Hi, > > i have a small problem to solve: > i want to animate the "src" attribute in an <img> tag > i have 25 scaled images of a filled circle. > the larest is 640x640px and the smallest is 32x32 > i want to animate the steps in one second. > can anyone give me a hint how to do that? > maybe with the animate method?
Try this: var src = ['32x32.png', ..., '640x640.png']; var interval = setInterval(function() { if (src.length > 0) { $('img').attr({ src: src.shift() }); } else { clearInterval(interval); } }, 1000); -- Klaus _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/