Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am working with SharePoint server 2013, and inside my Style Library folder I have added the Jquery file. then under the custmJSUrl section inside my seatle.master page, I added a reference to the jQuery file as follows:

<SharePoint:CustomJSUrl runat="server" />
<SharePoint:ScriptLink language="javascript" name="/sites/Intranet/Style Library/JS/jquery-1.10.2.min.js" runat="server"/>

but unfortunately doing so , will stop my page from being displayed and instead of that a blank white page will be displayed ? so is my approach of referencing jQuery the right way to follow?

share|improve this question
    
Try having only the /Style Library/JS/jquery-1.10.2.min.js in the Name property. –  Daniel Ziga Sep 24 '13 at 16:27
    
it did not work .. –  john G Sep 24 '13 at 16:30

1 Answer 1

up vote 4 down vote accepted

Scriptlink is typically reserved for JS files deployed to the file system.

The ScriptLink will always look in /_LAYOUTS/1033 for the scripts.

http://tommdaly.wordpress.com/2010/12/16/scriptlink-vs-whats-the-difference/

Just change it to the typical script src="/sites/Intranet/Style Library/JS/jquery-1.10.2.min.js" syntax or copy the JS files to the /_LAYOUTS/1033 folder on all of your servers.

share|improve this answer
1  
thanks for the reply. i added this <script type="text/javascript" src="/sites/Intranet/Style Library/JS/jquery-1.10.2.min.js" ></script> . should i add extra parameters ? –  john G Sep 24 '13 at 16:44
1  
no that should be sufficient –  PirateEric Sep 24 '13 at 17:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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