jQuery Responsive Table Plugin ReStable

Add-ons
2026-07-26 03:48 5 次浏览 • 0 次下载 85.9KB
jQuery Responsive Table Plugin ReStable

Usage

Include the followingjquery/jquery.restable.min.jsandjquery.restable.min.cssfile in the page.

1
2
3
<link rel="stylesheet" type="text/css" href="css/jquery.restable.min.css" />
<script type="text/javascript" src="path/to/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.restable.min.js"></script>

HTML Structure

The table uses a basic HTML table structure:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<table class="mytable">
<thead>
<tr>
<td>Period</td>
<td>Full Board</td>
<td>Half Board</td>
<td>Bed and Breakfast</td>
</tr>
</thead>
<tbody>
<tr>
<td>01/10/12 - 02/10/12</td>
<td>20 ?lt;/td>
<td>30 ?lt;/td>
<td>40 ?lt;/td>
</tr>
<tr>
<td>03/10/12 - 04/10/12</td>
<td>40 ?lt;/td>
<td>50 ?lt;/td>
<td>60 ?lt;/td>
</tr>
<tr>
<td>05/10/12 - 06/10/12</td>
<td>70 ?lt;/td>
<td>80 ?lt;/td>
<td>90 ?lt;/td>
</tr>
</tbody>
</table>

Initialize the Plugin

After the page DOM elements have finished loading, you can initialize this responsive table plugin using the ReStable() method.

1
2
3
$(document).ready(function () {
$('.mytable').ReStable();
});

The method above initializes all tables on the page. You can also initialize a specific table individually.

1
2
3
$(document).ready(function () {
$('.mytable').ReStable();
});

Configuration Parameters

The available parameters for this responsive table plugin are as follows:

1
2
3
4
5
$('.mytable').ReStable({
rowHeaders: true,
maxWidth: 480,
keepHtml: false
});
  • rowHeaders: Whether to display the table header.

  • maxWidth: Responsive breakpoint.

  • keepHtml: Whether to preserve the HTML content of each cell.

星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare