2022.2

Table Of Contents
propertyName
String;thenameoftheCSSproperty.
value
String;valuefortheCSSpropertyoramapofproperty-valuepairstoset.
Examples
ThisscriptlooksupanelementwiththeID#calloutboxandsetsitstextcolortored.
query("#callout p").css('color' , 'red');
Thefollowingscriptdoesthesame,butitonlysetsthetextcolortoredifinthecurrentrecordthevalue
ofthefield'accounttype'is'PRO'.
if(record.fields.accounttype == "PRO") {
query("#callout p").css("color","red");
}
Thisscriptsetsthetextcoloroftheresultstoahexadecimalcolorcode.
results.css('color' , '#669900');
Thisscriptloadsasnippetintoavariable.Thenitfinds/replacestextinthesnippetandappliesacss
propertytothereplacingtext.
var mysnippet = loadhtml('snippets/snippet vars.html');
mysnippet.find('@var@').text('OL Connect').css('text-decoration','underline');
results.replaceWith(mysnippet);
css(properties)
FunctiontosetoneormultipleCSSpropertiesofoneormoreHTMLelements,whichcanbe:
l
Theelementsthatmatchtheselectorofascript(see"results"onpage844).
l
Oneelementthatmatchestheselectorofascriptthatrunsfor"Eachmatchedelement"(see
"this"onpage781and"Settingthescopeofascript"onpage373).
l
Theelementsreturnedbyaqueryinthetemplate(see"query()"onpage742).
properties
Array;mapofproperty-valuepairstoset.
Page 762