Tabletools not working with multiple datatables in the same page

Tabletools not working with multiple datatables in the same page

luivis7luivis7 Posts: 6Questions: 1Answers: 0
edited March 2015 in Free community support

I'm using the TableTools plugin to extract data, this is how I'm initializing it:

var tt= new $.fn.dataTable.TableTools(myTable,{
            "buttons":[
                "copy",
                "csv",
                "xls",
                "pdf",
                {"type":"print", "buttonText":"Print me!"}
            ],
            "sSwfPath":'/Scripts/media/swf/copy_csv_xls_pdf.swf'
        });
        $(tt.fnContainer()).insertBefore("#TABLE_ID_HERE_wrapper");

This works when I have one datatable in the page but as soon as I have 2 or more datatables the buttons don't do anything when clicked, anyone know why this is?

This discussion has been closed.