$(document).ready(function(){ $("#headlines li").hide(); var headlineFadeSpeed = 5000; function showNextItem(){ var index = arguments[0] || 1; var $curLi = $("#headlines li:nth-child("+index+")"); var totalItems = $("#headlines li").length; $curLi.fadeIn("fast", function(){ setTimeout(function(){ $curLi.fadeOut("slow", function(){ index = (index < totalItems) ? index+1 : 1; showNextItem(index); }); }, headlineFadeSpeed); }); } showNextItem();});
I'm using this clever script from http://www.subchild.com/2008/08/02/creating-fading-headlines-in-5-minutes-with-jquery/
But am unsure of how to have two different fading lists on the same page:
Can anyone help?