Created
December 7, 2015 22:16
-
-
Save ericakfranz/b3f7c45d83bd7dcddcb3 to your computer and use it in GitHub Desktop.
Stop a video from playing in our Canvas lightbox optin when it closes.
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('OptinMonsterOnClose', function( event, data, object){ | |
//Assign the iframe's src to null, which kills the video | |
$('.optin_custom_html_applied iframe').attr('src', ''); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment