Harsh Makadia
Harsh Makadia

Reputation: 3443

Create dynamic pagination for div block in jquery

I have created a table using div instead of using table structure.Now I want to add pagination feature for this table which is created using div's. I wanted to know whether there is any plugin available which works with div.

Here is sample code

<div class="list">
    <div class="item">
        <div class="item-swipe">
            <div class="col-xs-5 col-xs-offset-1 col-lg-6 col-md-6 col-lg-offset-0 col-md-offset-0">
                <div class="wrap">
                    <span class="row1 date-content date whitespace">Col1</span>
                </div>
            </div>
            <div class="col-xs-4 col-xs-offset-2 col-lg-5 col-md-5 col-lg-offset-0 col-md-offset-0">
                <div class="wrap">
                    <span class="row1 date-content date">Col2</span>
                </div>
            </div>
            <div class="col-xs-3 col-lg-1 col-md-1 col-lg-offset-0 col-md-offset-0 hidden-xs hidden-xs hidden-sm hidden-md">
                <div class="wrap">
                    <a class="id">Col3</a>
                </div>
            </div>
        </div>
    </div>
</div>      

I have this sample code repeated.I have created table using the above structure.How can I now add pagination to this,Or how can I convert this into table so as to use pagination.

Upvotes: 0

Views: 3378

Answers (2)

Dheeraj Agrawal
Dheeraj Agrawal

Reputation: 2357

You can use JSONPagination Plugin, which doesn't depend on the DOM, since its done in the JSON level so you can create any kind of table using div or table tag, only few steps needs to be remembered which is explained in the plugin itself.

Disclaimer: I am the author of this plugin.

Upvotes: 0

cynx
cynx

Reputation: 387

You can explore JQuery Datatables. client-side or server-side pagination possible. Including infinite scroll.

Upvotes: 2

Related Questions