I am currently working on tables in bootstrap. It is working fine and good. Currently I have a problem with pagination. I am trying to push the data dynamically into the table, once the data became too large the table is expanding downwards..How can I make a pagination to the table?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
Maybe you should check the DataTables Pagination plugin (they offer a bootstrap markup) :
http://moorberry.net/blog/datatables-twitter-bootstrap-pagination/
Official Doc : http://datatables.net/plug-ins/pagination.
The other way would be to use the Tab feature of bootstrap (upside-down) and divide your table with conditional statement.
If you want to use Datatables with Bootstrap you need to initialize it:
Then create the table:
and do not forget to include this file: http://datatables.net/media/blog/bootstrap_2/DT_bootstrap.js
This was based on the post available here
SOLUTION
DataTables 1.10 has full support for Twitter Bootstrap 3. You just need to include DataTables Bootstrap add-on files (
dataTables.bootstrap.css
anddataTables.bootstrap.js
) in addition to jQuery, DataTables and Bootstrap files.DEMO
See the example below for code and demonstration.
LINKS