Skip to content

Instantly share code, notes, and snippets.

@ericakfranz
Created December 3, 2015 16:19
Show Gist options
  • Save ericakfranz/0f6820dfb3a43b94d223 to your computer and use it in GitHub Desktop.
Save ericakfranz/0f6820dfb3a43b94d223 to your computer and use it in GitHub Desktop.
Redirect the visitor to a specific URL when any optin is exited or successfully submitted.
jQuery(document).ready(function($){
function omRedirect() {
var url = "http://optinmonster.com";
$(location).attr('href',url);
}
$(document).on('OptinMonsterOptinSuccess', function(event, data, object){ omRedirect(); });
$(document).on('OptinMonsterOnClose', function(event, data, object){ omRedirect(); });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment