outputting the index of a li within a ul in a span to count what li is being displayed and display the index as they cycle
<p>I have it functioning to the point where I can put the script into the console in chrome and it will return the correct index of the li but its the refreshing as they cycle i am stuck on. Can anyone show me an example of this being implemented? </p>

<p>This is what i have so far:</p>

<pre><code>$('#slideCountNum').text($('ul.rslides li').length);

var currentSlide = $(".rslides1_on").index()+1;

$('#slideCountCurrent').text(currentSlide);
</code></pre>

<p>it is working but only displays the slide i am on and doesnt change when the slides change. :(</p>

<p>If i could see it being done somewhere then i am sure i could work it out. </p>

<p>here is the html i am using </p>

<pre><code>&lt;ul class="rslides"&gt; 
    &lt;li&gt;&lt;/li&gt; 
    &lt;li&gt;&lt;/li&gt; 
    &lt;li&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;div id="slideCounter"&gt; 
    &lt;span id="slideCountCurrent"&gt;&lt;/span&gt;
    &lt;span&gt;/&lt;/span&gt;
    &lt;span id="slideCountNum"&gt;&lt;/span&gt; 
&lt;/div&gt;
</code></pre>

<p>each of the li's contains an image.</p>
