Some problems with your code
fadeIn can take as a parameter the duration, attenuation and callback function
So the walkthrough lidoes nothing ..
You can use the callback to start the animation of the next liline.
So
function InOut( elem )
{
elem.delay()
.fadeIn()
.delay()
.fadeOut(
function(){ InOut( elem.next() ); }
);
}
and the first time just
$('#content li').hide();
InOut( $('#content li:first') );
http://www.jsfiddle.net/gaby/S5Cjm/
, , fadeOut
.fadeOut(
function(){
if(elem.next().length > 0)
{InOut( elem.next() );}
else
{InOut( elem.siblings(':first'));}
}
);
http://www.jsfiddle.net/gaby/S5Cjm/1/