How to show X number of divs at a time in Javascript?
<p>Assuming I have an array of names:</p>

<pre><code>var myarray = ["A", "B", "C", "D", ... "J"]
</code></pre>

<p>Say if I have 10 entries in my array and I only want to show 3 at any given time. How do I make it such that each entry, if shown, is shown in a div of red color with a "Back" link and a "Next" link? When I click next, it will show the next 3; when I click on previous it will show the previous 3.</p>

<p>Example:</p>

<p>Initially 3 Divs are Shown</p>

<pre><code>"A"  "B"  "C"
</code></pre>

<p>Clicking on "next" shows</p>

<pre><code>"D" "E" "F"
</code></pre>

<p>Clicking on "previous" shows</p>

<pre><code>"A" "B" "C"
</code></pre>

<p>Clicking on "next" 3 times shows only 1 div
"J"</p>

<p>How to go about this with Javascript or jQuery? Any sample is appreciated.</p>
