2

I have a problem with my Exporting buttons: it works just for the first jQuery Table, but in other tables it doesn't work.

I have included all what needs to be included.

Here is an example for 2 jqueryTabs:

var jQuery2 = jQuery.noConflict();
jQuery2(document).ready(function() {

    jQuery2('#t1').dataTable( {
        "bJQueryUI": true,
        "bScrollCollapse": true,
        "sDom": 'T<"clear">lfrtip',

        "oTableTools": {
            "aButtons": [
                "copy",
                "csv",
                "xls",
                {
                    "sExtends": "pdf",
                    "sPdfOrientation":"landscape",
                    "sPdfMessage": "Your custom message would go here."
                },
                "print"
            ]
        }
    });
    jQuery2('#t2').dataTable( {
        "bJQueryUI": true,
        "bScrollCollapse": true,
        "sDom": 'T<"clear">lfrtip',
        "oTableTools": {
            "aButtons": [
                "copy",
                "csv",
                "xls",
                {
                    "sExtends": "pdf","sPdfOrientation": "landscape",
                    "sPdfMessage": "Your custom message would go here."
                },
                "print"
            ]
        }
    } );

});
4

1 回答 1

0

我建议单独调用数据表,而不对两个表都使用 jQuery2 变量。

 $(document).ready(function() {
      $('#t1').dataTable( { ... });
      $('#t2').dataTable( { ... });
 });
于 2013-01-22T20:27:47.040 回答