Duplicate Element Action

The Duplicate Element action duplicates an element—and its children elements—and places it somewhere on a page. You can set the duplicated content to have a new unique ID attribute.

Keep any CSS styles from an ID or class and JavaScript bindings on elements you select intact within a Duplicate Element action. It doesn't, however, edit the content of the element you are duplicating.

For example, if you need to duplicate an element, such as a checkout button, and edit the text within that button, pair this action with an Insert HTML action to take over the button's inner HTML text.

Required Components

Element to Clone

Enter into Element To Clone the element selector for the element, including its children elements, that you want duplicated.

Relative Element Selector and Insert Function

Enter into Relative Element Selector where you want the duplicated content inserted. See Element Selectors for more information.

You can adjust where you want the duplicated content to appear in relation to the selected element with an option from Insert Method:

  • After the selected element
  • Before the selected element
  • Replace the selected element
  • First child of the selected element
  • Last child of the selected element
  • Take over the contents of the selected element

Optional Components

Cloned Element ID

You can add a new ID to the duplicated element in Cloned Element ID. A unique ID is useful if you need to style the duplicated element differently than the original element.

Wrap Cloned Element

Select YES to wrap the duplicated element in a <div> element. Select NO if you do not want the duplicated element wrapped in a <div> element.

Use jQuery for Cloning

The Use jQuery For Cloning option is useful if the element you want to duplicate has jQuery events attached to it. Select YES to duplicate these events and apply them to the duplicated element.

CSS Style

Monetate appends anything you add in the CSS editor to a stylesheet in the <head> portion of your site within a <style> block. These styles are available on this page for use with any page element.

Re-Check for Elements

Use the Re-check for Elements toggle to enable or disable polling. If you enable polling, Monetate continues to check for the selected element even if it does not initially appear on the page. This option is good if you have certain elements that don't fire right when the page loads.

If you disable polling, Monetate only checks for the element once when your page loads.