Reputation: 93
in section of compatibility of DataTables website (https://datatables.net/download/compatibility) is written
"DataTables and its extensions all require jQuery 1.7 or newer. Like all software, it is recommended that you always use the latest version of jQuery that is available as it will include additional features, performance enhancements and bug fixes"
so I decided to test his "zero configuration" example in my project with last version of jquery (jquery-3.1.1.min.js) but doesn't work.
Last version of jQuery https://jsfiddle.net/7LpaLqyL/ nothing is working
Version 1.12.4 of jQuery (version in the example) https://jsfiddle.net/zr7coz5u/ is working
and the code is the same
$('#example').DataTable();
so my question is, how can I do to use last version of jQuery?
Upvotes: 0
Views: 399
Reputation: 58860
Your example has invalid loading order, jQuery DataTables must be loaded after jQuery.
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.13/css/jquery.dataTables.css">
<!-- JS -->
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.13/js/jquery.dataTables.js"></script>
See updated example for code and demonstration.
Upvotes: 1