I have a nested function to show/hide paragraphs news-ticker-style.
The problem is that when the loop starts over (line 4), the opacity effects stop working correctly so the paragraphs appear abruptly.
Any jquery masters know about this? Am I making this too hard?
$('#special-ticker p').hide();
var a=0;
function outer() {
function inner() {
if(a===$('#special-ticker p').length) { a = 0; }
$('#special-ticker p').
eq(a).
fadeIn(800, function(){
$(this).animate({opacity:100},10000,null,function(){
$(this).hide(800,function(){
a++;
outer();
});
});
});
}
return inner();
}
$(function(){
outer();
});