Created
January 15, 2019 15:45
-
-
Save ameeker/2cf4690deb5521bded0b92feba48cab9 to your computer and use it in GitHub Desktop.
OptinMonster, Disable Fullscreen Background Clicks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We don't have a method to do this in the builder, but it can be done with some custom JS using our API. Unfortunately, we don't provide further support for this method, so you may need to have your developer take a look to ensure it works as expected for your website. | |
The way to do this is simple: | |
document.addEventListener('om.Types.init', event => { | |
event.detail.Types.Type.bgClose = false; | |
}); | |
If a customer wants to do this on a case-by-case basis, they can adjust to check the campaign id specifically: | |
document.addEventListener('om.Types.init', event => { | |
if ('{slug}' === event.detail.Campaign.id) { | |
event.detail.Types.Type.bgClose = false; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment