How can I combine PHP and jQuery in paging controls
<p>I am trying to implement paging in PHP. First of all I am getting the number of pages as per page record and generating <code>&lt;li&gt;</code> links dynamically by number of pages. Like this:</p>

<pre><code>for($i = 1; $i &lt;= $no_of_pages; $i++)
{
    echo '&lt;li&gt;&lt;a href="view_records.php?pageno='.$i.'"&gt;'.$i.'&lt;/a&gt;&lt;/li&gt;';
}
</code></pre>

<p>It's fine, but the problem is that when the number of pages is more than 10, the page number wraps to the next line. I want to scroll them by clicking left and right 10 pages each time.</p>

<p>Suppose I have 35 pages, so this will display all 35 pages links </p>

<pre><code>left 1 2 3 4 5 6 7 8 9 10 11 12 ......35 right
</code></pre>

<p>But I want only</p>

<pre><code>left 1 2 3 4 5 6 7 8 9 10 right 
</code></pre>

<p>When I click on <code>right</code> this will scroll right and should display</p>

<pre><code>left 11 12 13 14 15 17 18 19 20 right
</code></pre>

<p>Again <code>right</code> will display next 10 pages link. Is there anything in JS or jQuery to control that <code>li</code> for scrolling? It will be become easy because I get total no of pages by PHP and put link of them in HTML and user can directly move to desired page.</p>
