Home >Web Front-end >CSS Tutorial >Why Is My $(...).DataTable() Function Not Working?
TypeError: $(...).DataTable is not a Function
When attempting to utilize jQuery's DataTable JS, an error message "TypeError: $(...).DataTable is not a function" may arise. This typically implies that jQuery DataTables library is not available or not referenced correctly.
Cause
This error often results from:
Solution
Ensure that you have:
Example:
<script src="js/jquery.min.js" type="text/javascript"></script> <script src="js/jquery.dataTables.min.js" type="text/javascript"></script>
For further reference and troubleshooting, consult jQuery DataTables: Common JavaScript console errors.
The above is the detailed content of Why Is My $(...).DataTable() Function Not Working?. For more information, please follow other related articles on the PHP Chinese website!