2019.2

Table Of Contents
css()
Gets the value of a style property for the first element in the set of HTML elements that match
the selector of the script or of another query in the template (see "query()" on page1349), or
sets one or more CSS properties for every element in the set.
css(styleName) : String
Returns the value of the specified CSS property.
propertyName
String; the name of the CSS property.
Examples
This script stores the text color of the results (the HTML elements that match the selector of the
script) in a variable.
var textcolor = results.css("color");
The following script looks up an element with the ID #calloutbox and stores its background
color in a variable.
var backgroundcolor = query("#calloutbox").css("background-color");
css(styleName, value)
Function to set a CSS property.
propertyName
String; the name of the CSS property.
value
String; value for the CSS property or a map of property-value pairs to set.
Examples
This script looks up an element with the ID #calloutbox and sets its text color to red.
Page 1309