Where And How To Add Java Script And jQuery In SharePoint Online

Today, I am writing about where and how to add JavaScript and jQuery in SharePoint sites. As we know, the use of script, and especially adding any script on SharePoint pages, will make the task easy and understandable.

For example, if we have a list with multiple PDP pages it will look very odd together on the same page. We need to always scroll down all the pages to select a particular PDP.

With the help of the script, we can see in the categories view and can access it very easily. For the same reason, we will be using TAB code for SharePoint; search for more on Google.

http://www.markrackley.net/2015/08/16/sharepoint-tabbed-web-partshillbillytabs-3-0/


To add any script on SharePoint online page, follow the steps mentioned below.

  • Login to the SharePoint site or login to the subsite with user Id and password.
  • To add any script on the page or any list, PDP; we need to edit the page.

    SharePoint

  • Click page tab and edit this page or click on setting option and select edit page.

    SharePoint

  • Once we have clicked on edit page, it will start edit wizard and here, we need to add a Web part for the script, where we can add our code.

    SharePoint

  • Now, add the Web part for the script to do this. Go to categories of Web part, select media, and content will take the script Web part from right side of the screen, as shown below.

    SharePoint

  • Now, click add button to add script edit Web part. Wait for some time till it is adding.
  • Now, we can see script editor has been added over here. We will be getting an option called EDIT SNIPPEST, click on this and add your code.

    SharePoint

    SharePoint

  • Now, the result will be, as shown below.

    SharePoint

Thanks.