[jQuery] Re: Looking for an automated image replace loop

2008-12-27 Thread BarisArt
Hi Kean! Thanks for this. it is working! You made my weekend :) Baris On 16 dec, 00:39, Kean wrote: > I forgot to include the detection script to see if it's the last child > >     var cur = $("#gallery li:visible"); >   if (cur.is(":last-child") ) { >       cur.fadeOut(500, function(){ >    

[jQuery] Re: Looking for an automated image replace loop

2008-12-15 Thread Kean
I forgot to include the detection script to see if it's the last child var cur = $("#gallery li:visible"); if (cur.is(":last-child") ) { cur.fadeOut(500, function(){ // run the loop function again when time is up, in this case 5 seconds $("#gallery li:first-child").fadeIn(

[jQuery] Re: Looking for an automated image replace loop

2008-12-15 Thread Kean
This might work I will give the ul an id="gallery" var loop = function(){ //current slide var cur = $("#gallery li:visible"); // fade out current li, on finish fade in next li cur.fadeOut(500, function(){ // run the loop function again when time is up, in this case 5 seconds