John Chapman

[SharePoint 2010] Solution to Load jQuery on All Pages

Share on TwitterShare on LinkedInShare on TumblrSubmit to StumbleUponSave on DeliciousDigg ThisSubmit to reddit

I have written a simple solution for SharePoint Foundation 2010 and SharePoint Server 2010 to allow site administrators to add the jQuery library to each SharePoint page without modifying master pages or adding it with a Content Editor Web Part.

This feature is installed to the farm and is enabled on a per-site basis. By navigating to Site Actions > Site Settings > Look and Feel > jQuery Settings, the site administrator can also configure the version of jQuery to load (1.3.2 through 1.6.1) and where the jQuery library will be delivered from (the local site or one of the available Content Delivery Networks).

jQuery Solution

Download the Solution

To Install the Solution

  1. Extract files to local hard drive (i.e. to c:TEMP)
  2. Open the SharePoint 2010 Management Shell (PowerShell)
  3. Use Add-SPSolution to upload the WSP file to the SharePoint farm
    Add-SPSolution -LiteralPath C:TEMPPhoenixCodes.jQuery.wsp
  4. Use Install-SPSolution to deploy the WSP to the farm
    Install-SPSolution -Identity phoenixcodes.jquery.wsp -GACDeployment
  5. To enable the feature on a specific site, visit Site Actions > Site Features.
  6. Activate the “Phoenix Codes – Globally Load jQuery Library” feature.

I hope you find this solution helpful. Thanks.

Share on TwitterShare on LinkedInShare on TumblrSubmit to StumbleUponSave on DeliciousDigg ThisSubmit to reddit

John Chapman

Hello, I'm John Chapman. I am a SharePoint developer living in Denver, Colorado. I develop solutions using ASP.NET, C#, jQuery, SQL, SharePoint, etc, and I thrive on the challenge of writing code to overcome the impossible, annoying, or otherwise difficult obstacles.

More Posts - Website - Twitter

6 Comments

Leave a comment

John Chapman