简体   繁体   English

在多个表上具有引导程序的DataTables TableTools

[英]DataTables TableTools with Bootstrap on Multiple Tables

I have multiple tables displayed in one web page, being initialized by below code: 我在一个网页中显示了多个表,并通过以下代码初始化:

/* Tables initialisation */
$(document).ready(function() {
$('.dataTable').dataTable({
    "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span3'T><'span3'i><'span6'p>>",
    "sPaginationType": "bootstrap",
    "bStateSave": true,
    "oLanguage": {
        "sLengthMenu": "_MENU_ records per page"
    },
    "oTableTools": {
        "sSwfPath": "http://cdnjs.cloudflare.com/ajax/libs/datatables-tabletools/2.1.4/swf/copy_csv_xls_pdf.swf",
        "aButtons": [ "copy", "csv", "xls", "pdf", "print" ]
    }
});
});

There is no javascript error in both Chrome or Safari, nevertheless when clicking on any of the buttons, it just doesn't work. Chrome或Safari中都没有javascript错误,但是单击任何按钮时,它都无法正常工作。 Please help me debug / figure out what's wrong! 请帮我调试/找出问题所在!

Never-mind! 没关系! Apparently it's working now and it always did. 显然,它现在可以正常运行了。 I realized it after reading this post: http://datatables.net/forums/discussion/15605/even-tabletool-examples-are-not-working :) 在阅读这篇文章后,我意识到了这一点: http : //datatables.net/forums/discussion/15605/even-tabletool-examples-are-not-working :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM