In this article we will discuss about how we can call jQuery into a SharePoint page using content editor web part. In my previous articles I have explained about how to deploy jQuery to SharePoint using solution package. After you deploy jQuery to SharePoint, it is time to call jQuery to SharePoint page.
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.
If you want to learn SharePoint online then you can Download a FREE PDF on SharePoint online tutorial and Download FREE PDF on HUB site in SharePoint online. Also read SharePoint Online modern experience and Impact on InfoPath in modern UI in SharePoint online office 365.
fallow the below articles:
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.
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.
SharePoint Online FREE Training
JOIN a FREE SharePoint Video Course (3 Part Video Series)