I have searched all over the internet for an answer, please I need someone to help me. I am writing a plugin and I am loading an external Javascript/jQuery file that uses the $ as usual.
We all know that WordPress jQuery file is in no conflict mode. Here are the options I found but none of them seems to work in my case:
1.
jQuery(document).ready(function($) {
});
Problem: This only applies to custom script you write. What if you are loading external file
Add this before
wp_head()
var $ = jQuery.noConflict();
Problem: I am writing a plugin, not theme. I am not in control of that
Add this before the external file
var $ = jQuery;
Problem: You may not be able to do this