Buttons to datatable not working

Buttons to datatable not working

sumit0733sumit0733 Posts: 2Questions: 1Answers: 0

I want to add file export option to datatable 1.10.16, but when I add dom and buttons, I got following error Uncaught ReferenceError: jQuery is not defined,
I have added following dependencies:
jQuery JavaScript Library v2.1.4 <script src="../lib/jquery/jquery.js"></script>, DataTables 1.10.16 <script src="../lib/datatables/jquery.dataTables.js"></script>, <script src="https://cdn.datatables.net/buttons/1.7.1/js/dataTables.buttons.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.7.1/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.7.1/js/buttons.print.min.js"></script>

Can you help me on this, as I am experimenting on jQuery datatable and file export?

$('#datatable1').DataTable({ responsive: true, "order": [], dom: 'Bfrtip', buttons: [ 'copy', 'csv', 'excel', 'pdf', 'print' ], language: { searchPlaceholder: 'Search...', sSearch: '', lengthMenu: '_MENU_ items/page', } });

Answers

Sign In or Register to comment.