Jon Imms
asked on
Uncaught TypeError: $ is not a function
Getting the following error in my js script. : Uncaught TypeError: $ is not a function
Not sure how to fix it?
$(document).ready(function() {
setTimeout(function() {
$('#data-ad-popup').modal('show');
}, 10000); // milliseconds. set to 10 seconds.
});
Not sure how to fix it?
Make sure the jQuery library is loaded.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
$ => jQuery.
For jQuery to work it must be included on your page with a <script> tag
1. The <script> must be BEFORE the use of $(...
2. Ensure that jQuery has not been set to compatibility mode try
For jQuery to work it must be included on your page with a <script> tag
<script src="... path to jQuery file "></script>
1. The <script> must be BEFORE the use of $(...
2. Ensure that jQuery has not been set to compatibility mode try
jQuery(function($) {
// continue to use $ here (jQuery also works but $ is easier and fits in with common use case)
});