- Add jQuery file to Site Assets library
- Edit the Page
- Insert Content Editor web part
- Insert jQuery code
- Test page
I am expanding each of the steps
Step 1: Add JQuery file to Site Assets Library
Download jQuery.js from the following location:
You can choose a compressed/non-compressed version:
Rename & Upload the file to Site Assets library, for faster access.
Step 2: Edit the Page
Choose Site Actions > Edit Page to bring your page in edit mode.
If you are using New/Edit pages of list/library, you can read this to enable Editing.
Step 3: Insert Content Editor web part
Click Insert tab & choose Media and Content > Content Editor Web Part.
After insertion, choose the Edit Web Part option.
Click on the web part content area.
Choose the Format tab > HTML > Edit HTML Source button as shown below.
You will get the dialog box below:
(Ensure that it is a BLANK one)
Step 4: Insert jQuery Code
In the dialog box place the following code:
alert("JQuery: Hello, World!");
The dialog box now looks like:
Click OK button to close the dialog.
From the Page tab, click the Save button to save page changes too.
Step 5: Test Page
Click on the Home link & you will see the following message box.
This concludes the steps to include jQuery.
This is one way of integrating jQuery into SharePoint pages. You can also try editing the Master Page & including jQuery.js from the server side.