1.5

Table Of Contents
Selector Matched element Matched element after script
execution
translate="first"></p>
<p data-
translate="last"></p>
<p data-
translate="email"></p>
<p>último</p>
<p>dirección de correo
electrónico</p>
empty()
Remove the contents (child elements and inner HTML) from one element or a set of elements in
the template.
Use remove() to remove the elements themselves.
Example
This script empties all Span elements found in the template.
results.empty();
Selector Paragraph
before script
execution
Paragraph after script
execution
span <p>Lorem ipsum
<span>dolor
sit</span> amet,
consectetuer
adipiscing
elit.</p>
<p>Lorem ipsum
<span></span> amet,
consectetuer adipiscing
elit.</p>
filter()
filter(callback)
Returns a subset of a set. All elements for which the callback function returns true will be
included in the result.
callback
Page 755