IT:AD:DS.JS:HowTo:Operators
Summary
After you have a Selection), you apply one of (basically) two types of Operators.
Operators on Item Properties
Much like IT:AD:JQuery, once you have a Selection, you can modify the properties of the elements in the Selection:
classedis a bit of a surprise in that it's second arg (value) is boolean function/arg indicating whether to add/remove the class.- For all of them, a null value will remove anything there.
Selection Set Mutations
Alternatively, you can operate on the set itself – mutating it.
The following is a naive attempt to find the 3 p's, and add a new one, with some text in the new one…
It did exactly what you requested (it Selected All, then Added a P to each one, then changed the html of each element), but is probably not what was expected:
<callout icon="true" type="id="ex01"> <p>Uno<p>woohoo<p></p> <p>Dos<p>woohoo<p></p> <p>Tres<p>woohoo<p></p"> </callout>
Instead, you probably wanted something more like: