2019.2

Table Of Contents
Example
This script loads a snippet, then looks for placeholders using find(), and replaces them using
text(value).
var mysnippet = loadhtml('snippets/snippet.html');
mysnippet.find('@var1@').text('OL Connect 1');
mysnippet.find('@var2@').html('<i>OL Connect 2</i>').css('text-
decoration','underline');
results.replaceWith(mysnippet);
width()
Gets or sets the outer width, including padding and borders, of the first element in the results
(see "results" on page1389), i.e. the set of HTML elements that match the selector of the script
or of another query in the template (see "query()" on page1349).
width(): Number
Returns the outer width of this element, including padding and borders, excluding margins. To
include margins, call width(true).
The returned value is the width in pixels, without measurement unit (e.g. 400).
width(value): void
Sets the outer width of this element, including padding and borders, excluding margins. To
include margins, call width(value, true).
value
Number. Give the width in pixels, but without the measurement unit (e.g. 400, not 400px).
Examples
This script adds 20 pixels to the width and height of an element.
var h = results.height();
var w = results.width();
h = h + 20;
w = w + 20;
Page 1326