Available events in the Snitcher (for developers)

There are available several custom events:

While opening a popup window

document.addEventListener( 'snitcher-open' , ( e ) => {

console.log( e.detail );

}, false);

While closing a popup window

document.addEventListener( 'snitcher-close' , ( e ) => {

console.log( e.detail );

}, false);

Below is an example of snitcher-open/snitcher-close

closeBtn: "top-right"
closeKey: "on"
closePlace: "modal"
content: ""
fullscreen: "off"
id: "mdp-snitch-19"
inactivityTimer: "0"
openTimer: "0.4"
overlay: "off"
position: "top-center"
scrollDirection: "down"
scrolled: "1"
scrolledUnit: "px"
selector: ".wp-block-button__link"
showAfter: "0"
tabStatus: "visible"
trigger: "click"

Was this article helpful to you?