Skip to content

Commit a9c9987

Browse files
committed
Added showRow-hideRow method
1 parent 9d3ea70 commit a9c9987

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
<li><a href="methods/remove.html">remove</a></li>
6363
<li><a href="methods/insertRow.html">insertRow</a></li>
6464
<li><a href="methods/updateRow.html">updateRow</a></li>
65+
<li><a href="methods/showRow-hideRow.html">showRow/hideRow</a></li>
6566
<li><a href="methods/mergeCells.html">mergeCells</a></li>
6667
<li><a href="methods/checkAll-uncheckAll.html">checkAll/uncheckAll</a></li>
6768
<li><a href="methods/check-uncheck.html">check/uncheck</a></li>

index.html.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
<li><a href="methods/remove.html">remove</a></li>
6363
<li><a href="methods/insertRow.html">insertRow</a></li>
6464
<li><a href="methods/updateRow.html">updateRow</a></li>
65+
<li><a href="methods/showRow-hideRow.html">showRow/hideRow</a></li>
6566
<li><a href="methods/mergeCells.html">mergeCells</a></li>
6667
<li><a href="methods/checkAll-uncheckAll.html">checkAll/uncheckAll</a></li>
6768
<li><a href="methods/check-uncheck.html">check/uncheck</a></li>

methods/showRow-hideRow.html

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>showRow/hideRow</title>
5+
<meta charset="utf-8">
6+
<link rel="stylesheet" href="../assets/bootstrap/css/bootstrap.min.css">
7+
<link rel="stylesheet" href="../assets/bootstrap-table/src/bootstrap-table.css">
8+
<link rel="stylesheet" href="../assets/examples.css">
9+
<script src="../assets/jquery.min.js"></script>
10+
<script src="../assets/bootstrap/js/bootstrap.min.js"></script>
11+
<script src="../assets/bootstrap-table/src/bootstrap-table.js"></script>
12+
<script src="../ga.js"></script>
13+
</head>
14+
<body>
15+
<div class="container">
16+
<div class="ribbon">
17+
<a href="https://github.com/wenzhixin/bootstrap-table-examples/blob/master/methods/showRow-hideRow.html" target="_blank">View Source on GitHub</a>
18+
</div>
19+
<h1>showRow/hideRow</h1>
20+
<p>
21+
Show/Hide the specified row.<br>
22+
<code>$table.bootstrapTable('showRow', 1);</code><br>
23+
<code>$table.bootstrapTable('hideRow', 1);</code>
24+
</p>
25+
<div id="toolbar">
26+
<button id="button" class="btn btn-default">Show Row</button>
27+
<button id="button2" class="btn btn-default">Hide Row</button>
28+
</div>
29+
<table id="table"
30+
data-toggle="table"
31+
data-toolbar="#toolbar"
32+
data-height="460"
33+
data-url="../json/data1.json">
34+
<thead>
35+
<tr>
36+
<th data-field="id">ID</th>
37+
<th data-field="name">Item Name</th>
38+
<th data-field="price">Item Price</th>
39+
</tr>
40+
</thead>
41+
</table>
42+
</div>
43+
<script>
44+
var $table = $('#table'),
45+
$button = $('#button'),
46+
$button2 = $('#button2');
47+
48+
$(function () {
49+
$button.click(function () {
50+
$table.bootstrapTable('showRow', 1);
51+
});
52+
53+
$button2.click(function () {
54+
$table.bootstrapTable('hideRow', 1);
55+
});
56+
});
57+
</script>
58+
</body>
59+
</html>

0 commit comments

Comments
 (0)