Uncaught TypeError: $(...).dataTable is not a function
Uncaught TypeError: $(...).dataTable is not a function
when i call this page with an ajax request in chrome return this error, but with firefox all works fine
can someone help me?
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="../jquery/jquery.min.js"></script>
<script src="../bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" language="javascript" src="../datatable/jquery/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="../datatable/jquery/jquery-ui.css">
@ DataTable css -->
<link rel="stylesheet" type="text/css" href="../datatable/media/css/jquery.dataTables.min.css">
<!-- @@@ DataTable buttons css -->
<link rel="stylesheet" type="text/css" href="../datatable/extensions/Buttons/css/buttons.dataTables.min.css">
<!-- @@@ DataTable js -->
<script type="text/javascript" language="javascript" src="../datatable/media/js/jquery.dataTables.min.js"></script>
<!-- @@@ DataTable buttons js -->
<script type="text/javascript" language="javascript" src="../datatable/extensions/Buttons/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" language="javascript" src="../datatable/extensions/Buttons/js/buttons.flash.js"></script>
<!-- @@@ Pdf exporting js -->
<script type="text/javascript" language="javascript" src="../datatable/extensions/Buttons/pdfmake.min.js"></script>
<script type="text/javascript" language="javascript" src="../datatable/extensions/Buttons/vfs_fonts.js"></script>
<!-- @@@ Excel exporting js -->
<script type="text/javascript" language="javascript" src="../datatable/extensions/Buttons/jszip.min.js"></script>
<!-- @@@ Print button js -->
<script type="text/javascript" language="javascript" src="../datatable/extensions/Buttons/js/buttons.print.min.js"></script>
<!-- @@@ DataTable buttons js -->
<script type="text/javascript" language="javascript" src="../datatable/extensions/Buttons/js/buttons.html5.min.js"></script>
<script type="text/javascript" language="javascript" class="init">
$(document).ready(function() {
} );
// @@@ creazione della tabella
$('#example').dataTable( {....
Answers
Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.
Information on how to create a test page, if you can't provide a link to your own page can be found here.
My guess is that you are loading jQuery more than once.
Thanks,
Allan