Triggers
Last updated
Was this helpful?
Last updated
Was this helpful?
NEW! UNDER TESTING 🧪 Learn more about here.
SA5 Events is a centralized pub-sub event system which makes triggers and actions consistent throughout all SA5 modules.
Modals is one of the first modules we're refitting with this capability.
Common triggers used to;
Scroll Position 🧪
Exit Intent 🧪
sa-event-action-modal-open
= ( event-name ) When the event event-name is invoked, open the current modal.
Place this directly on the wfu-modal
element that you want to open.
sa-event-action-modal-hide
sa-event-trigger-modal-opened
sa-event-trigger-modal-closed
Click
wfu-modal-trigger-click
SA5 Events Action
Timer
wfu-modal-trigger-timer
Scroll Position 🧪
SA5 Event Trigger
Scroll into View 🧪
Exit Intent 🧪
Click
wfu-modal-trigger-click
= ( modal-name )
Manual
Defined on any button, link, or other element
Timer
wfu-modal-trigger-timer
= ( time in milliseconds )
Automatic
Configured in seconds
Scroll Position 🧪
Automatic
Configured for a specific page % or a specific px position
Scroll into View 🧪
Automatic
Tied to an element
Exit Intent 🧪
Automatic
When the mouse moves outside of the page canvas
Gate
Manual
There are many different ways to trigger a modal open. Depending on the type of trigger, these attributes will be placed either on a triggering element, or on the modal element itself.
On the button or element to be clicked, add this attribute;
wfu-modal-trigger-click
= ( modal-name )
Specify the modal's name that you want to open.
Triggers the modal when a timer has elapsed, starting from page load.
Place this directly on the modal element.
wfu-modal-trigger-timer
= ( time in milliseconds )
Click
Direct
wfu-modal-trigger-click
Modal name
Place on the triggering button, link, or element
Timer
In-Direct
wfu-modal-trigger-timer
Time in milliseconds
Place on the modal element directly
This is being combined with SA5 Trigger. Event = open modal Action
Types;
Manual triggers are user-actioned. These can be configured to ignore modal suppression even if it has already been closed.
Automatic triggers will only open the modal if it is un-suppressed.
Suppression;
Goals;
Timed open, in ms
Auto unhide
Or, click trigger, for interaction
Respects suppression setting
Triggered open, by scroll
Triggered open, by exit intent
Timed close, in ms
Element removal
Or, click trigger, for interaction
? Option to suppress
DEPRECATED These attributes are fully supported but considered deprecated. is the modern way to trigger modals.