-1

I got the error while I updated my WordPress theme. The WordPress jQuery file has enqueued as well and it's loading as well. Also notable that, I used the following function to avoid jQuery conflict on WordPress

(function($) {
    //Code 
})(jQuery);

The jQuery $ sign is working as well but the 'jQuery' is not working. Here I attached a screenshot of the error.

The Error Screenshot

Eh Jewel
  • 619
  • 8
  • 14
  • 2
    Chrome has it's own `$` variable. The fact that `jQuery` is undefined says to me that jQuery is not being loaded correctly or that it's being loaded after your code. – joh04667 Sep 09 '16 at 20:26
  • Wordpress uses jQuery in `noConflict` mode, please keep that in mind – empiric Sep 09 '16 at 20:30
  • I checked that the jQuery is loading at the top of all other js files. – Eh Jewel Sep 09 '16 at 20:31

1 Answers1

0

Change this block to:

$(function() {
    //Code 
})(jQuery);