http://jsfiddle.net/LZoesch/xovrr3uo/
<div class="container">
<div class="panel panel-default">
<form method="POST" action="">
<button class="btn btn-default btn-sm pull left" name="reset"><span class="glyphicon glyphicon-stats"></span>
</button>
<button type="submit" class="btn btn-default btn-sm pull-right" name="reset"><span class="glyphicon glyphicon-refresh"></span>
</button>
</form>
</div>
</div>
<div>
<table class="table2">
<div id="chartCanvas" style="padding-left:5px;">
<canvas id="canvas" style="width:98%;height:500px;"></canvas>
<br>
</div>
</tbody>
<script type="text/javascript">
script goes here for chart.js
</script>
</table>
尝试让glyphicon打开/关闭表格&#34; table2&#34;
答案 0 :(得分:0)
'table2'表格标签不合适。表中应包含行和单元格元素。
<table>
<tr>
<td>{{DATA}}</td>
</tr>
</table>
根据上述语法,在单元格内添加内容。
现在使用jsfiddle链接click here获取有关如何切换表格的JQuery代码。
Js小提琴代码:
$(".glyphicon-stats").on('click', function () {
$('.table2').toggle();
});
更新jsfiddle链接 http://jsfiddle.net/mvamsianil/xovrr3uo/8/