Cycle through list and call function based on id
<p>I have a list of items as such:</p>

<pre><code>&lt;ul&gt;
&lt;li&gt;&lt;a href="#" id="Viewer1"&gt;click&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" id="Viewer2"&gt;click&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" id="Viewer3"&gt;click&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" id="Viewer4"&gt;click&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" id="Viewer5"&gt;click&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>There are various functions attached to each ID:</p>

<pre><code>$j('#Viewer1').click(viewer1);
function viewer1() {
some code...
return false;
}
$j('#Viewer2').click(viewer2);
some code...
return false;
}
$j('#Viewer3').click(viewer3);
function viewer3() {
some code...
return false;
}
$j('#Viewer4').click(viewer4);
function viewer4() {
some code...
return false;
}
$j('#Viewer5').click(viewer5);
function viewer5() {
some code...
return false;
}
</code></pre>

<p>What I'd like to do is use jQuery to loop over each id and call the appropriate function for a specific interval.</p>

<p>First, Viewer1() is called for say 4 seconds and then Viewer2() and so on ---looping back to Viewer1() and starting over.  I hope that makes sense.</p>

<p>Thanks.</p>
