2022.1

Table Of Contents
Note
To make scripts run exclusively on certain sections, it is advised to put them in folders
and set the execution scope of the scripts in a folder via the folder properties; see
"Execution scope" on page๎˜ƒ926.
Example
The following rule applies formatting to <h1> elements in sections of which the name starts with
โ€˜Letterโ€™:
[section^='Letter'] h1 {
color: brown;
}
Note
To target sections as well as Master Pages, use the body selector without the masterpage
or section selector. For example:
l Selector: body
l Script: results.html('<div
style="background:red;width:1in;height:2in">Hello
World</div>');
In versions prior to 2019.2 the section selector would work on sections as well as Master
Pages. As of version 2019.2 this is no longer the case. The section selector now only
selects sections.
Master Page selector
The Designer writes the name of each Master Page to the masterpage attribute of the <html>
element. This attribute can be used in selectors.
Example
This script adds a box to the body of every Master Page.
Page 941