I have placed the jquery library script in the layouts folder on my server:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\CustomScripts

for what ever reason, I cannot get a simple script to run. I have tried every combination I can think of:

<SharePoint:ScriptLink ID="jqueryScriptLink" Localizable="false" runat="server" Name="/_layouts/CustomScripts/jquery-1.11.1.min.js"></SharePoint:ScriptLink>

<SharePoint:ScriptLink ID="jqueryScriptLink" Localizable="false" runat="server" Name="/CustomScripts/jquery-1.11.1.min.js"></SharePoint:ScriptLink>

<script src="/CustomScripts/jquery-1.11.1.min.js"></script>

<script src="/_layouts/CustomScripts/jquery-1.11.1.min.js"></script>

But none seem to load the jquery library. I placed a simple alert in the document ready function:

$(document).ready(function() { 

and it isn't working. Is there something in SP or on the server that needs to be done before you can call a custom script from this location? I have tried also to navigate to the script URL:




Again, no dice. It says webpage not found.

Any help is appreciated

  • try to add type= text/javascript to script import element
    – Nk SP
    Sep 15, 2014 at 14:17
  • tried it but the same thing Sep 15, 2014 at 14:26
  • You can import jquery using this: <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    – Nk SP
    Sep 15, 2014 at 14:27
  • Try this: <SharePoint:ScriptLink ID="jqueryScriptLink" Localizable="false" runat="server" Name="CustomScripts/jquery-1.11.1.min.js"></SharePoint:ScriptLink>
    – Aanchal
    Sep 15, 2014 at 14:27
  • How many application servers?
    – Nk SP
    Sep 15, 2014 at 14:29

2 Answers 2


Do you have more that one web front end server in your SharePoint environment?

  • yes, two. I am going to copy the script folder right now Sep 15, 2014 at 14:32
  • DOH! Stupid oversight. It works now after adding it to both WFEs. Thank you and Nk SP Sep 15, 2014 at 14:34

I had a similar issue once. What helped me is placing the js-File in the SiteAssets and referring it from there. What also helped was using jQuery instead of $ in front of every jQuery command and using

function MyFunctionName()
 // Code

to make sure all the other js-Files were loaded before executing your code.

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.