0

I have jQuery not defined error on one of my js files on my wordpress site, the console shows me an error here :

jQuery.noConflict();(function($){"use strict";$.fn.hasAttr=function(attr){if(typeof attr!==typeof undefined&&attr!==false&&attr!==undefined){return true;}

1 Answers1

0

Okay I found the solution on internet. The solution for this problem is to head over first to the file you're having the problem in. (In my case main-rtl.js) Then :

var $ = jQuery.noConflict();

(function($) {

    "use strict";

    $.fn.hasAttr = function(attr) {  
       if (typeof attr !== typeof undefined && attr !== false && attr !== undefined) {
            return true;
       }
       return false;
    };