pagination javascript
<p>I have an array in javascript with following data to be populated in the div's.The array is as follows</p>

<pre><code>var array1 = new array('abc','def', 'ghi', 'jkl','mno');
</code></pre>

<p>I want to implement pagination for a div containing set of div's holding each with data of above array.i.e., div 1 will contain abc,div 2 will contain def and so on...</p>

<p>I am sending the page no clicked and maximum number of divs to be displayed in a page to a function.I am setting max_num of div's to be displayed is 2.The function is as follows.</p>

<pre><code>function renderPagination(pageno, max_num){
    for(var i=0;i&lt; max_num; i++){
   }
} 
</code></pre>

<p>//Here i have to run a loop where the set of div's to be populated.i.e.if pageno is '0',the abc,def div's should get seen.If pageno is '1', the ghi,jkl div's should get rendered.I think instead of i=0,I have to initialize to other variable.</p>

<p>Can anyone help me.</p>
