Manipulate DOM Element Action
The Manipulate DOM Element Action can create and remove elements, move them within the DOM, set their attributes, and move their siblings inside them.
- Target Element ID: when creating an element, if specified, this is the ID that will be given to the new element. When not creating, the ID is required, and is the ID of the element to be operated on.
- Tag Name to Create: the name of the HTML tag to create, if creating a new tag.
- Attributes: a list of attributes to set on the element. Enter them as "name=value", one per line. Attributes are only set when a tag is being created. Use the Set Attribute Action to set attributes for existing elements. Use the Set Style Action to set style properties.
- ID of Element to Move to/Move Where in Relation to Destination?: if not blank, the target element will be moved in the DOM to the specified location with respect to this element. If left blank when creating an element, it will be positioned with respect to the document body element.
- Enclose: if checked, all sibling elements will be moved inside the target element. This will occur after it has been moved, if it is being moved.
- Remove: if checked, the target element will be removed instead of being created.
- Maximum Times: the maximum number of times that this Action will execute before it ignores all future events. The counter resets when the page is reloaded. If set to a negative value, it will execute an unlimited number of times.