1

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?

2
  • Try having only the /Style Library/JS/jquery-1.10.2.min.js in the Name property.
    – user2536
    Commented Sep 24, 2013 at 16:27
  • it did not work ..
    – John John
    Commented Sep 24, 2013 at 16:30

1 Answer 1

4

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.

2
  • 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 John
    Commented Sep 24, 2013 at 16:44
  • 1
    no that should be sufficient Commented Sep 24, 2013 at 17:19

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.