There are different ways you can call jQuery libraries to SharePoint page like:
- By using content Editor web part
- By using custom actions
- By dynamically through code
- By adding the script to the master page etc.
In this article we will discuss how we can call through the content editor web part
. This is one of the simplest approach, But jQuery will be available on the same page where the Content Editor web part is added, it will not affect any other pages. This can be used in Sandboxed environment.You can read this article
to know more about Sandboxed solution.
Follow below steps to call jQuery through content editor webpart:
First edit the page on which you want to call the jQuery libraries. Then on one of the webpart zone click on Add a Web Part.
Then from the Media and Content category section select Content Editor web part and click on Add as shown in the figure below.
Then in the content editor web part Click on "Click here to add new content" to edit the contents of the web part.
In the Ribbon, go to the Format Text section, select HTML in the Markup group, and choose HTML Source as shown in the figure:
Now in the edit html source dialog box paste the below line:
Now Save and Publish the page.
After this step the jQuery will be avilable to the SharePoint page.