1.8

Table Of Contents
l
A selector (HTML/CSS):
n HTML elements of a certain type, such as a paragraph: <p>. In the Script
Wizard, click Selector and type the HTML tag in the Selector field without the
angle brackets: p.
n HTML elements with a specific CSS class (eg. green). In the Script Wizard,
click Selector and type the class name in the Selector field , preceded by a
dot: .green.
n An HTML element with a specific ID (eg. intro). In the Script Wizard, click
Selector and type the ID in the Selector field , preceded by #: #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; also see "Selectors in Connect" on
page660 for selectors that can only be used in Connect.
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: "Testing scripts" on page632.
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.
Page 626