2022.2

Table Of Contents
propertyName
String;thenameoftheCSSproperty.
Examples
Thisscriptstoresthetextcoloroftheresults(theHTMLelementsthatmatchtheselectorofthe
script)inavariable.
var textcolor = results.css("color");
ThefollowingscriptlooksupanelementwiththeID#calloutboxandstoresitsbackgroundcolorina
variable.
var backgroundcolor = query("#calloutbox").css("background-color");
css(styleName, value)
FunctiontosetaCSSpropertyofoneHTMLelementorofeachelementinaresultset.
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');
Page 1253