2021.1

Table Of Contents
Which kind of library or framework you'll want to work with depends on the type of features you
really desire. For a bit of help with that and a few examples, see this how-to: Using external
libraries.
Some JavaScript files are added automatically: When you create a template with a COTG
Template Wizard (see "Capture OnTheGo template wizards" on page573), the Designer
automatically adds the jQuery library v. 3.5 and the COTG library: cotg-2.1.0.js. This also
happens when you add a Capture OnTheGo (COTG) element to a template that you didn't start
with a COTG template wizard. For more information about this plugin, see "Using the COTG
plugin" on page599.Capture OnTheGo and Jumbotron template wizards automatically add the
Foundation files v. 5.5.1 to the resources of the template. For more information about the use
of Foundation in the Designer, see "Using Foundation" on page577.
Tip
It is possible to open and edit any JavaScript file in the Designer: select File > Open,
select All files (*.*) as the file type and then select a JavaScript file.
Adding JavaScript files to the Resources
Adding a JavaScript file
To add a JavaScript file to the resources:
1. Add the file:
l Right-click the JavaScript folder on the Resources pane, and click New
JavaScript. Double-click it to open and edit it.
l Alternatively, drag and drop the JavaScript file from the Windows Explorer to the
JavaScript folder on the Resources pane.
l Or import one or more JavaScript files from another template; see "Import
Resources dialog" on page961.
2. Make some settings for the file: right-click the file on the Resources pane and select
Properties.
l Defer postpones the execution of the script until the page in which it is included has
finished parsing. This attribute is required by APIs like Google Maps.
l When async is checked, the script executes asynchronously with the rest of the
page (while the page continues the parsing).
Page 558