1.6

Table Of Contents
n HTML elements with a specific CSS class (.green). In the script Wizard, click
Selector and type the class name, including the preceding dot: .green.
n An HTML element with a specific ID (#intro). In the script Wizard, click
Selector and type the ID, including the preceding #: #intro.
In an HTML file, each ID should be unique. This means that a particular ID can
be used only once in each section.
n Etcetera. See http://www.w3schools.com/cssref/css_selectors.asp for more
selectors and combinations of selectors.
l
A selector and text. This is text inside an HTML element (or several HTML
elements) with a specific HTML tag, CSS class or ID. In the script Wizard, click
Selector and Text.
Tip
When output speed matters, choose selector or selector and text. Searching text
is a rather lengthy operation, compared to searching for HTML elements and/or
CSS selectors. See also profiling scripts.
There is a shorter route to create a script for an element with a specific ID:
1. In the template, click the element for which you want to create a script.
2.
On the Attributes pane at the top right, type an ID. (In HTML,IDs start with #, but in
this field you should type it without the preceding #).
3. Click the label to the left of the ID input field (ID)to make a new script with the ID that
you typed as a selector.
Writing a script
1. Create a new script (see: "Creating a new script" on the previous page), or double-click
an existing script in the Scripts pane on the bottom left.
If the script was made with a Script Wizard, you have to click the Expand button before
you can start writing code. This will change the Script Wizard into an editor window.
Page 530