1

I'm getting a strange jQuery error message in my theme. The message is showing in browser console-

Uncaught TypeError: jQuery is not a function

Note: I used the bellow method in my custom jQuery files and I set jquery in the dependency parameter when I enqueue my custom JS files.

(function($) {
   "use strict";
    // jQuery code goes here
})(jQuery); 
var $mcj = jQuery.noConflict(true);

Where is the problem?

1
  • Please show us how exactly you have registered and enqueued your scripts.
    – fuxia
    Dec 3, 2016 at 9:24

1 Answer 1

2

I solved the problem my own. I just deleted the last line-

var $mcj = jQuery.noConflict(true);

from my jQuery file then I get rid of the Uncaught TypeError.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.