The Swap Elements action switches the position of two elements on a page.
Some common use cases for swap actions include the following:
- Swapping the order of two products
- Reordering navigation bar links
- Switching the positions of two banners
This action also appends included CSS styles in the
<head> of the page.
Selectors for Element A and Element B
Enter into Selector For Element A the selector to find the first element that you want the action to swap. Enter into Selector For Element B the selector to find the second element that you want the action to swap. For additional information on element selectors, refer to Element Selectors.
The action appends any CSS you input in Style for Element A as an inline style attribute of the first element you move with this action. It appends any CSS you input in Style for Element B as an inline style attribute of the second element you move with this action.
Monetate appends anything you input into the CSS editor to a stylesheet in the
<head> portion of your site in a
<style> block. These styles are available on this page for use with any page element.
Re-Check for Elements
The Re-check for Elements setting enables or disables polling. If you enable polling, then 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, then Monetate only checks for the element once when the page loads.