I've been trying to use the TableExport.js plugin found at to add Bootstrap HTML table export functionality to my website.
I meticulously followed all the steps to include jquery FileSaver, tableExport javascripts, and css.
<!-- jQuery -->
<script src="../vendor/TableExport/js/jquery-3.3.1.js"></script>
<!-- TableExport JavaScript -->
<script src="../vendor/TableExport/js/tableexport.js"></script>
<script src="../vendor/TableExport/js/tableexport.min.js"></script>
<script src="../vendor/FileSaver.js/FileSaver.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="../vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- DataTables JavaScript -->
<script src="../vendor/datatables/jstest/jquery.dataTables.min.js"></script>
<script src="../vendor/datatables-plugins/dataTables.bootstrap.min.js"></script>
<script src="../vendor/datatables-responsive/dataTables.responsive.js"></script>
<!-- Custom Theme JavaScript -->
<script src="../dist/js/sb-admin-2.js"></script>
Below is how I am calling the tableExport function:
<caption class="btn-toolbar bottom tableexport-caption">
<button tableexport-id="c203fc6-xlsx" class="btn btn-default xlsx" onClick="$("#dataTables-example").tableExport();">Export to xlsx</button>
<button tableexport-id="759d678-xls" class="btn btn-default xls" onClick="$("#dataTables-example").tableExport();">Export to xls</button>
<button tableexport-id="87e8a31-csv" class="btn btn-default csv" onClick="$("#dataTables-example").tableExport();">Export to csv</button>
<button tableexport-id="78cbc47-txt" class="btn btn-default txt" onClick="$("#dataTables-example").tableExport();">Export to txt</button>
</caption>
However, when I click on any of the buttons, I encounter an error:
Uncaught SyntaxError: Unexpected end of input here at <button tableexport-id="78cbc47-txt" class="btn btn-default txt" onClick="$("#dataTables-example").tableExport();">Export to txt</button>
https://i.sstatic.net/prFva.png
Any thoughts on where I might be making a mistake?
Thank you.