2022.2

Table Of Contents
OLConnectclassesandattributes
OLConnectitselfsometimesaddsaspecificclassorattributetoelementsinatemplate.Capture
OnTheGowidgets,forexample,havearoleattributethatallowstheCOTGlibrarytodictatetheirbeha-
viour.OLConnect-specificclassesandattributescanbeusedinselectors,aswillbeexplainedand
demonstratedbelow.
OLConnect-specificclassesusuallyareinvisibleintheDesigner.Byopeningthecurrentlyselected
sectioninyourdefaultwebbrowser(clickthePreviewHTMLtoolbarbutton)andusingthebrowser's
codeorsourceinspectoryoucanseemostofthedynamicallyaddedclasses.
Caution: Avoidusingclasseswiththe__olprefixinyourselectors.Thesedynamicallyadded
classnamesmaychangeinfuturereleasesofthesoftware.
Section selector
TheDesignerwritesthenameofeachsectiontothesectionattributeofthe<html>element.This
attributecanbeusedinselectors.
Note: Tomakescriptsrunexclusivelyoncertainsections,itisadvisedtoputthemin
foldersandsettheexecutionscopeofthescriptsinafolderviathefolderproperties;see
"Executionscope"onpage375.
Example: Thefollowingruleappliesformattingto<h1>elementsinsectionsofwhichthename
startswith‘Letter’:
[section^='Letter'] h1 {
color: brown;
}
Note: TotargetsectionsaswellasMasterPages,usethebodyselectorwithoutthemas-
terpageorsectionselector.Forexample:
l
Selector:body
l
Script:results.html('<div style-
e="background:red;width:1in;height:2in">Hello World</-
div>');
Page 386