admin管理员组文章数量:1332403
Can you please take a look at This Demo and let me know how I can re-position the dataTabes buttons somewhere else , let say inside .panel-heading
calss and apply btn-sm
to them?
Here is the very basic standard format which I have now
$(document).ready(function() {
$('#example').DataTable({
responsive: true,
dom: 'Bfrtip',
buttons: ['copy', 'excel', 'pdf', 'csv']
});
});
and as you are fully aware it is adding the buttons inside #example-wrapper
Can you please take a look at This Demo and let me know how I can re-position the dataTabes buttons somewhere else , let say inside .panel-heading
calss and apply btn-sm
to them?
Here is the very basic standard format which I have now
$(document).ready(function() {
$('#example').DataTable({
responsive: true,
dom: 'Bfrtip',
buttons: ['copy', 'excel', 'pdf', 'csv']
});
});
and as you are fully aware it is adding the buttons inside #example-wrapper
1 Answer
Reset to default 8Sure. Use jQuery appendTo()
, like this:
//create DataTable first, then...
$("#example_wrapper > .dt-buttons").appendTo("div.panel-heading");
See this fiddle: https://jsfiddle/gz586wpj/1/
There's also a prependTo()
that you can consider.
本文标签: javascriptHow to position DataTables buttons outside of table wrapperStack Overflow
版权声明:本文标题:javascript - How to position DataTables buttons outside of table wrapper - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742278616a2445673.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论