0

hey guys, i have a certain plugin on my website that adds a inline script segment to my website.

this is the first line of this inline script.

jQuery(document).ready(function($)

jquery 1.5 is loaded in my head. However in my normal script.js file where all my selfmade js is stored I use...

$(document).ready(function(){

Anyway... my problem is that this inline script with jQuery(document)...causes my console to shout: "jQuery is not defined"...

any idea how to fix that? I can't access the inline script!

3 Answers 3

1

Add these before your jquery call: jQuery.noConflict();

Sign up to request clarification or add additional context in comments.

Comments

0

If your plugin ends up adding its own scripts before jQuery gets pulled in then yes you will run into this problem. Will you be able to point us to the actual page?

You might want to lazy load the plugin if possible.

Comments

0

jQuery and $ (usually) refer to the same thing. Check if your jQuery libraries are loaded BEFORE (ie are higher in the HEAD section) your plugin..

1 Comment

I'm using head.js to load multiple javascript files. jQuery is one of those files loaded with head.js... this is causing the problem. Any idea how I could solve that!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.