1

As the question states, What different ways can jQuery be added to SharePoint?

Lets say that we have deployed jQuery to SharePoint.

We can add it through:

  • Master Page.

  • Adding it to a new Site through a Feature Event Receiver.

Question:

Can jQuery be added with JavaScript? If YES, would a good way to do this, to have a addJQuery.js file that can be included in the JS-Link property?

What other ways are available?

George Norberg
  • 1,315
  • 3
  • 13
  • 33

2 Answers2

4

You could also link it through a Custom Action. You can find more information about this approach at http://weblogs.asp.net/jan/archive/2010/03/01/scriptsrc-referencing-javascript-files-with-sharepoint-2010-custom-actions.aspx

Waldek Mastykarz
  • 2,514
  • 12
  • 8
2

You can add Jquery refernce directly to the master as it will required on many pages.

Following links will help you how to add this:

How to add JQuery library in SharePoint 2013?

Adding jQuery to master page

Aanchal
  • 7,885
  • 1
  • 15
  • 20
  • Well lets say i can't touch the masterpage. What other ways arr available? – George Norberg May 22 '14 at 16:11
  • 1
    From feature you can add javascript file to site. http://sharepoint.stackexchange.com/questions/6180/inject-javascript-into-a-page-from-a-feature – Aanchal May 22 '14 at 16:21