zesty.io

Product

Use Cases

Integrations

Learn

Javascript

JavaScript files are managed from the Editor underneath the JavaScript file list. You can either choose to create an internal file or link to an external file.

Overview

Zesty.io provides a few ways to add JavaScript to your sites. Most are managed from the Editor underneath the JavaScript file list, otherwise JavaScript can be added to HTML views with script tags. When adding JavaScript to the JavaScript file section you can either choose to create an internal file or link to an external JavaScript file. Scripts are concatenated and uglified without Parsley. Parsley is not accessible files in the Script section.

Internal JavaScript Files

#

Any JavaScript files created in the code editor will be concatenated and delivered synchronously as a single file in the document head.

It's important to note that because all the JavaScript is served before the document is loaded if your doing anything with the DOM you need to check that the DOMContentLoaded event has fired. This is commonly accomplished with the jQuery document ready() function.

jQuery DOM ready example:

External JavaScript Files

#

By creating a JavaScript Link you can add externally hosted files to your site. This is a great option for JavaScript libraries that are hosted on well known CDNs. Which can potentially be cached in your visitors browser allowing them to avoid a resource download.

Inline JavaScript

#

If needed you can also add JavaScript inline on a Zesty template page. A common use case would be adding an analytics vendors tracking code on the loader, this would make the tracking code available on every page across your site.

Start Here

We will listen to your needs and walk you through how Zesty can help your team.

Connect with Content Experts

Book a free 15-minute consultation with a content expert. Discuss your application, pain points and requirements. Understand how Zesty's lower total cost of ownership, features, functionality can elevate your business by creating extraordinary digital experiences.

Trusted By

zesty customer logo Sonyzesty customer logo Rocket Leaguezesty customer logo Singlifezesty customer logo Acornszesty customer logo Phoenix Sunszesty customer logo Wattpadzesty customer logo Corner Shopzesty customer logo Bjs

Enter your details to connect with a Content Expert

First Name

Last Name

Email

Phone (optional)

Company

Please tell us about your project (optional)

G2 MOMENTUM LEADER

zesty customer logo zesty customer logo zesty customer logo zesty customer logo