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
| document.addEventListener( "DOMContentLoaded", function(event) { | |
| document.onload('EventName', function( event,data,object ) {} ); | |
| }); |
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
| $(document).on('OptinMonsterLoaded', function( event, data, object ){ | |
| console.log(event); | |
| console.log(data); | |
| console.log(object); | |
| }); |
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
| jQuery(document).ready( function($){ | |
| $(document).on('OptinMonsterInit', function( event, data, object ){ | |
| // If video is playing (add your own logic here), remove the optin. | |
| if ( data.optin ) { | |
| $('#om-' + data.optin).remove(); | |
| } | |
| }); | |
| }); |
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
| jQuery(document).ready( function($){ | |
| $(document).on('OptinMonsterManualOptinSuccess', function( event, data, object ){ | |
| console.log("Congratulations! The " + data.optin + '-' + data.type + " manual-trigger optin has been successfully loaded."); | |
| }); | |
| }); |
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
| jQuery(document).ready( function($){ | |
| $(document).on('OptinMonsterManualOptinError', function( event, data, object ){ | |
| console.log("Oops! There was a problem loading the " + data.optin + '-' + data.type + " manual-trigger optin on this page."); | |
| }); | |
| }); |
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
| jQuery(document).ready( function($){ | |
| $(document).on('OptinMonsterLoaded', function( event, data, object ){ | |
| console.log("Congratulations! The " + data.optin + '-' + data.type + " optin has been successfully loaded."); | |
| }); | |
| }); |
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
| /* --- CSS to position the video overlay --- */ | |
| #overlay { | |
| position: fixed; | |
| left: 0; | |
| top: -90px; | |
| bottom: 0; | |
| right: 0; | |
| width: 100%; | |
| height: 500%; | |
| background: #000; |
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
| jQuery(document).ready( function($){ | |
| //Snag the URL of the iframe so we can use it later | |
| var url = $('.optin_custom_html_applied iframe').attr('src'); | |
| $(document).on('OptinMonsterOnShow', function( event, data, object){ | |
| //Below we remove the URL to stop the video from playing, here we add it back in | |
| $('.optin_custom_html_applied iframe').attr('src', url); | |
| }); | |
| $(document).on('OptinMonsterOnClose', function( event, data, object){ |
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
| jQuery(document).ready( function($){ | |
| $(document).on('OptinMonsterPositionOptin', function( event, data, object ){ | |
| $('#om-canvas-whiteboard-optin').dragon(); | |
| }); | |
| }); |
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
| jQuery(document).ready( function($){ | |
| $(document).on('OptinMonsterBeforeClose', function( event, data, object ){ | |
| var url = "http://optinmonster.com"; | |
| $(location).attr('href',url); | |
| }); | |
| }); |