Show first and last page only when there is more than one page number using jquery or javascript?
<p>I have two buttons like this:</p>

<pre><code> &lt;button class="next_prev" onclick="" id="first_buttons" disabled&gt;{{ pages.first }}&lt;/button&gt;
&lt;button class="next_prev" onclick="" id="last_buttons" disabled&gt;{{ pages.last }}&lt;/button&gt;
</code></pre>

<p>If there is only one page by default the page {{ pages.first }} and {{ pages.last }} store the page number 1 and 1 and show it. But I only want to show these two buttons if page number is great than 1. I get page length like this:</p>

<pre><code>&lt;p&gt; &lt;span&gt;{% get_pages %} {{ pages|length }} pages&lt;/span&gt; &lt;/p&gt;
</code></pre>

<p>Can it be done in jquery  or javascript? Thanks</p>
