user2166164
user2166164

Reputation:

My Bootstrap TableTools are not working as expected

My TableTools are not working, I get this error in the console:

Uncaught TypeError: Cannot read property 'aDataSort' of undefined

in jquery.datatables.min.js file

I have included these two files

<script src=" <?php echo base_url('assets/js/TableTools/js/dataTables.tableTools.min.js'); ?>"></script>
<link href="<?php echo base_url('assets/js/TableTools/css/dataTables.tableTools.min.css'); ?>" rel="stylesheet" media="screen">

and my jQuery is:

$('#datatable_examplesss').dataTable( {
                    "dom": 'T<"clear">lfrtip',
                    "tableTools": {
                        "sSwfPath": "/swf/copy_csv_xls_pdf.swf"
                    }
                } );

but it does not showing me anything on table please help me

Upvotes: 1

Views: 196

Answers (1)

Severin
Severin

Reputation: 11

can you post the full code on jsfiddle or something like that?

If i had to guess it could be your load order of the libs.

Try this order:

script type="text/javascript" src="dataTables.tableTools.min.js"
script type="text/javascript" src="jquery.dataTables.min.js"

If this does not help u could try to set ur jQuery in the noConflict Mode.

But a full example would help as well.

Cheers

Upvotes: 0

Related Questions