Try pre-set campaigns and get your first conversions within 15 minutes.
Mailocator / Custom HTML and JavaScript 2025-02-17 18:33:59

Tag for closing cross

Mailocator Engage has a custom ML-CLOSE tag that creates a closing cross and closes the campaign when clicked. The cross doesn't require an action to be added, it will be added automatically.

Location

We recommend always placing the ML-CLOSE tag immediately after the beginning of the tag ML-MAIN

<ml-main>
     <ml-close class="tpx-outside tpx-black"></ml-close> 
     ...
</ml-main> 

Events

If you want to use the cross to simply close a campaign, you do not need to add any Mailocator action to this tag.

If you want to use the cross for multiple actions - *for example, closing and redirecting to a URL*- - use the standard action as needed.

Colour, size and location

You can easily set the properties of the closing cross directly in the editor. Just right click on the element and select Settings / Properties.

All properties are also available using the following classes:

tpx-blackblack cross in white box
tpx-whitewhite cross in black field
tpx-grayblack cross in gray field
tpx-transparentcross without background
tpx-thin1px thin cross
tpx-semimedium cross 2px
tpx-boldthick cross 3px
tpx-insidecross placed inside the campaign element
tpx-outsidecross placed outside the campaign element

No cross outside the campaign area? Add to the element ML-MAIN styl overflow:visible !important

Custom color of the closing cross

To change the color of the closing cross, add the following declaration to the CSS styles with a custom color (red):

ml-close:before, ml-close:after {
  background-color: red !important;
} 

Display crosshair after hover

By adding the tpx-onhover class, the crosshairs remain hidden until the user hovers the cursor over the campaign object. This class can only be applied to desktop content.