SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The dev site was set up as a subsite in a site collection with the URL http://server/sites/site but on the production server it's just http://site so the src attribute on the dev box <script type="text/javascript" src="/Sites/site/Scripts/jquery-1.6.4.min.js"></script> obviously doesn't work on the prod box. I tried to set it like:

<script type="text/javascript" src="<% $SPUrl:~SiteCollection/Scripts/jquery-1.6.4.min.js" %></script>

but no luck (tried with/without runat="server"). What's the preferred approach here?

Thanks in advance.

share|improve this question
up vote 0 down vote accepted

Why not copy it to a mapped folder in the 14 hive, like /_layouts/scripts/jquery-1.6.4.min.js that way it is accessible from any site/web?

Should do the trick.

share|improve this answer

Your Answer


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.