JQuery $ is not a function
When adding JQuery script in WordPress, the error occurred as $ is not a function.
Fix
Add a function wrapping the $
function as below.
<script type="text/javascript">
(function($) {
// You pass-in jQuery and then alias it with the $-sign
// So your internal code doesn't change
}) (jQuery);
</script>