Mohan Ram
Mohan Ram

Reputation: 8463

jQuery pajinate plugin customization problem

I am using Pajinate – A jQuery Pagination Plugin for pagination in my page

Following are my codes

        $(document).ready(function(){
            $('#paging_container6').pajinate({
                start_page : 2,
                items_per_page : 5  
            });
        }); 

HTML Code:

        <div id="paging_container6" class="container">
            <h2>Custom Start Page</h2>
            <div class="page_navigation"></div>

            <ul class="content">
                 <li><p>One</p></li> 
                 <li><p>Two</p></li> 
                 <li><p>Three</p></li> 
                 <li><p>Four</p></li> 
                 <li><p>Five</p></li> 
                 <li><p>Six</p></li> 
                 <li><p>Seven</p></li> 
                 <li><p>Eight</p></li> 
                 <li><p>Nine</p></li> 
                 <li><p>Ten</p></li> 
                 <li><p>Eleven</p></li> 
                 <li><p>Twelve</p></li> 
                 <li><p>Thirteen</p></li> 
                 <li><p>Fourteen</p></li> 
                 <li><p>Fifteen</p></li> 
                 <li><p>Sixteen</p></li> 
            </ul>   

        </div>  

Pagination would be like this:

enter image description here

Question: When i reach first page I need to hide out prev button. similarly when i reach last page i need to hide out last button.

Is there is any option with this plugin or I need a solution for this pagination problem.

Upvotes: 1

Views: 2707

Answers (2)

dennisbest
dennisbest

Reputation: 419

There is a solution. Per the documentation:

A style class called 'no_more' is added to the first/prev links if the first link is active and similarly for the last/next links. This allows you to give these links a "disabled" appearance if required.

So just use CSS to hide the class 'no_more'.

Upvotes: 5

Sujit Agarwal
Sujit Agarwal

Reputation: 12508

As stated on this documentation page I don't really see if there is an inbuilt parameter or feature to solve your problem.

Upvotes: 1

Related Questions