我在bootstrap主题上实现了一个jquery Datatable,它被认为是响应但不是。这是我的HTML ..
<div class="col-xs-12 table-responsive">
<table class="table table-condensed table-striped table-bordered" id="bttable">
<tfoot>
<tr></tr>
</tfoot>
</table>
</div>
这是我的jquery ..
dt = $("#bttable").dataTable({
"data": dataSet,
"paging": false,
"responsive": true,
"stateSave": true,
"columns": [
{ "title": "<input type='checkbox' id='selectAll'>", "bSortable": false, "width": "5px", },
{ "title": "<a href='#' class='btn btn-xs' title='Edit' data-toggle='modal' data-target='#responsive' onclick='edit()'><i class='fa fa-pencil'></i></a>", "bSortable": false, "width": "5px" },
{ "title": "FirstName", "width": "50px" },
{ "title": "LastName" },
{ "title": "Contact Number" },
{ "title": "Email ID" }
]
});
我的小提琴:https://jsfiddle.net/56n6wwd8/
请帮我制作这个数据表的响应。感谢..
答案 0 :(得分:3)
试试这样:
<div class="col-xs-12">
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered" id="bttable">
<tfoot>
<tr></tr>
</tfoot>
</table>
</div>
</div>