Released Installed
Requires jQuery, Bootstrap CSS + JS, then bootstrap-table. Order matters.
<!-- CSS in <head>: Bootstrap + bootstrap-table -->
<link rel="stylesheet" href="https://cdn.roste.org/bootstrap/latest/bootstrap.min.css" />
<link rel="stylesheet" href="https://cdn.roste.org/bootstrap-table/latest/bootstrap-table.min.css" />
<!-- JS before </body>: jQuery → Bootstrap → bootstrap-table -->
<script src="https://cdn.roste.org/jquery/latest/jquery.min.js"></script>
<script src="https://cdn.roste.org/bootstrap/latest/bootstrap.bundle.min.js"></script>
<script src="https://cdn.roste.org/bootstrap-table/latest/bootstrap-table.min.js"></script><!-- CSS in <head>: Bootstrap + bootstrap-table -->
<link rel="stylesheet" href="https://cdn.roste.org/bootstrap/latest/bootstrap.min.css" />
<link rel="stylesheet" href="https://cdn.roste.org/bootstrap-table/latest/bootstrap-table.min.css" />
<!-- JS before </body>: jQuery → Bootstrap → bootstrap-table -->
<script src="https://cdn.roste.org/jquery/latest/jquery.min.js"></script>
<script src="https://cdn.roste.org/bootstrap/latest/bootstrap.bundle.min.js"></script>
<script src="https://cdn.roste.org/bootstrap-table/latest/bootstrap-table.min.js"></script><!-- CSS in <head>: Bootstrap + bootstrap-table -->
<link rel="stylesheet" href="../bootstrap/latest/bootstrap.min.css" />
<link rel="stylesheet" href="latest/bootstrap-table.min.css" />
<!-- JS before </body>: jQuery → Bootstrap → bootstrap-table -->
<script src="../jquery/latest/jquery.min.js"></script>
<script src="../bootstrap/latest/bootstrap.bundle.min.js"></script>
<script src="latest/bootstrap-table.min.js"></script> | ID | Name | Price |
|---|---|---|
| 1 | Item 1 | $1 |
| 2 | Item 2 | $2 |
| 3 | Item 3 | $3 |
<table data-toggle="table">
<thead><tr><th data-sortable="true">ID</th><th>Name</th><th>Price</th></tr></thead>
<tbody>
<tr><td>1</td><td>Item 1</td><td>$1</td></tr>
<tr><td>2</td><td>Item 2</td><td>$2</td></tr>
</tbody>
</table>| ID | Name | Price |
|---|
<table id="tableJs" data-toggle="table" data-pagination="true" data-search="true">
<thead><tr><th data-field="id">ID</th><th data-field="name">Name</th><th data-field="price">Price</th></tr></thead>
</table>
<script>
$("#tableJs").bootstrapTable({ data: [
{ id: 1, name: "Item 1", price: "$1" },
{ id: 2, name: "Item 2", price: "$2" }
]});
</script>| ID | Name | Price |
|---|---|---|
| 1 | Apple | $1.00 |
| 2 | Banana | $0.50 |
| 3 | Orange | $1.20 |
| 4 | Mango | $2.00 |
| 5 | Grape | $3.00 |
<table data-toggle="table" data-search="true" data-pagination="true" data-page-size="5">
<thead><tr><th data-sortable="true">ID</th><th>Name</th><th>Price</th></tr></thead>
<tbody>...</tbody>
</table>