2021.2

Table Of Contents
Selector Paragraph
before script
execution
Paragraph after script
execution
<span>dolor
sit</span> amet,
consectetuer
adipiscing
elit.</p>
<span></span> amet,
consectetuer adipiscing
elit.</p>
find()
find(textToFind)
Performs a deep search for textToFind in the children of each element, and returns a new result
set with elements that surround the occurrences.
textToFind
A String that contains the search text.
Example
The following piece of code loads a snippet, then looks for placeholders using find(), and
replaces them with a text.
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);
hasClass()
hasClass(classname) : Boolean
Returns true if the HTML element or the first element in a result set has the specified class.
classname
String containing one class name.
Page 1386