How can we help you today?

How to use jQuery with the ShortPoint Code Design Element

This article will show you how to use jQuery with the Code Design Element.


Quick Walkthrough

1. Edit the ShortPoint Web Part.

2. Click the plus icon and insert the Code Design Element.

3. Copy the string below and paste it into the JavaScript field:

shortpoint.$

4. Add your JavaScript code after the string.

5. Go to the Design tab and disable Sandbox Mode.

6. Click the green checkmark to apply your changes.

7. Click Save to keep your changes.


TABLE OF CONTENTS


Prerequisites

  • You must have the latest version of ShortPoint SPFx installed on your SharePoint environment.
  • You must be a ShortPoint Designer with an active license.
  • You must prepare the JavaScript code you will use together with the jQuery.

Interactive Tutorial

Before starting the interactive tutorial, copy the string below:

shortpoint.$



Step-by-step Tutorial

Follow the detailed guide to learn how to use jQuery:


Step 1: Edit the ShortPoint Web Part

  • Go to the SharePoint page you want to use and click Edit:

Edit


  • Click the close icon to leave the Toolbox:

close icon


  • Select the ShortPoint tag.
  • Click the Edit Properties icon:

Edit properties icon


Step 2: Insert the ShortPoint Code Design Element

NOTEBefore proceeding, make sure you have already prepared the JavaScript code you will use together with the jQuery.


  • Choose where you want to add the Code Design Element and click the plus icon to see the library of Design Elements:

plus icon


  • Look for Code using the search bar and select it.

Step 3: Copy and Paste String

  • Copy the string below to start accessing jQuery:
shortpoint.$
  • Paste the string in the JavaScript field:

paste in JavaScript field


Step 4: Add Your JavaScript

  • Add the JavaScript Code you prepared after the string:

paste after string


Step 5: Disable Sandbox Mode

  • Navigate to the Design tab.
  • Disable Sandbox Mode.
NOTEMake sure to not skip this step. Otherwise, jQuery will not work as expected.

Step 6: Save

  • Click the green check mark to apply your changes.
  • Click Save to keep your changes:


Save


That’s it! You now know how to use jQuery with the Code Design Element.


Related articles:

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

World's best intranet sites are designed using ShortPoint

Get started today! Learn more
See all 83 topics

Start a trial

Ignite your vision. Install ShortPoint directly on your site, or play in sandbox mode. No credit card required.

Get started today

World’s best intranet sites are designed using ShortPoint

Thousands of companies using ShortPoint everyday to design, brand and build award winning intranet sites.

Get started Learn more