If you capture the object returned by the ouibounce function, you can control the modal programmatically using the public API.
Methods
fire(): Manually triggers the ouibounce event.disable(): Disables Ouibounce so it will not fire on page exit.disable({ options }): Disables Ouibounce sitewide for a specific duration using cookie options.
Disable Options
The disable method accepts the following cookie configuration keys:
cookieExpirecookieDomaincookieNamesitewide
Example
var modal = ouibounce(document.getElementById('ouibounce-modal'));
modal.fire(); // fire the ouibounce event
modal.disable(); // disable ouibounce
modal.disable({ cookieExpire: 50, sitewide: true }); // disable sitewide for 50 days
var modal = ouibounce(document.getElementById('ouibounce-modal'));
modal.fire();