XF 2.1 Uncaught ReferenceError using DataTables in XF 2.1


Active member
I've upgraded from XF 1.5 to XF 2.1 on a test installation of my site. Some of my page nodes have tables built using DataTables. The tables display fine on my xf 1.5 installation, but not on the XF2 - I'm getting the following errors:

Uncaught ReferenceError: $ is not defined (index)

datatables.min.js:30 Uncaught ReferenceError: jQuery is not defined
at datatables.min.js:30
at datatables.min.js:30

I've included the following HTML on my page:

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.21/css/jquery.dataTables.css">

<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.js"></script>

$(document).ready( function () {
} );

Can anyone help?