I'm getting a

jQuery undefined

error because my library isn't loading from CDN. On my html master page I've got this reference. I'm a little new to SharePoint branding and have seen lots of examples on the net with this. I anyone able to assist me here with what I'm doing wrong.

enter image description here

3 Answers 3


If you try to add an normal script tag with a src="" .. does it work then? That would in that case be as good as the other. You don't have to use ScriptLink for all scripts if you not are using the engine in SharePoint if you're not loading it through the SOD. Explained here: By Hugh Wood

  • Thanks. I've sorted now by removing actual need of jQuery in master pages which I believe was not necessary from what i've read on the net. The jquery load happens on pages that require it. Commented Jun 3, 2015 at 9:40

I am not sure from the screenshot if you referencing the jQuery file at the correct position. It may lead to not loading of the script. Please try adding a simple script with an alert, if the alert pops up then the position is correct.

For the reference error, I am never been able to get CDN working, you can manually store the Jquery file in site assets and refer it like below:

<script type="text/javascript" src="<SiteURL>/SiteAssets/scripts/jquery-1.8.1.min.js">

I always get it to work like this in SharePoint Online.



<script src="//ajax.googleapis.com/ajax/libs/jQuery/1.11.12/jquery.min.js">

Your Answer

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

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