Before-popup-display Event

Lisa Fockens Updated by Lisa Fockens

The before-popup-display event is fired before the display of a popup. This is one of the various events Wisepops can trigger as part of our JS callbacks feature.

Prevent popup display

The display of the popup can be prevented by calling preventDefault() on the event:

wisepops('listen', 'before-popup-display', function(event) {
  event.preventDefault();
});

Event target

The targeted element (event.target) is the popup HTML element, with the class wisepops-popup.

Use cases

How did we do?

Before-form-submit Event

Before-tab-display Event

Contact