Last active
February 8, 2018 12:49
-
-
Save tswfi/8c8303250b54c5b79fa18d582ae1f1c7 to your computer and use it in GitHub Desktop.
This file contains 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
<!-- | |
MailChimps evil popup modal tries to load new require and dojo and its not playing nice at all. | |
This uses the older embed forms and opens the modal with the existing jQueryUI modals. | |
--> | |
<div id="MailChimp" style="display:none;"> | |
<!-- below copy paste what ever you got from mailchimp --> | |
<!-- Begin MailChimp Signup Form --> | |
<link href="//cdn-images.mailchimp.com/embedcode/horizontal-slim-10_7.css" rel="stylesheet" type="text/css"> | |
<style type="text/css"> | |
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;} | |
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block. | |
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */ | |
</style> | |
<div id="mc_embed_signup"> | |
<form action="https://epagesdesign.us9.list-manage.com/subscribe/post?u=c0a3f96c1696a95cd83604ede&id=86489690dd" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> | |
<div id="mc_embed_signup_scroll"> | |
<label for="mce-EMAIL">Subscribe to our mailing list</label> | |
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required/> | |
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--> | |
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_44533482eb2e54a88517905a7_83bbac0262" tabindex="-1" value=""/></div> | |
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"/></div> | |
</div> | |
</form> | |
</div> | |
<!--End mc_embed_signup--></link> | |
</div> | |
<script type="text/javascript"> | |
require(["jquery", "ep/fn/busy", "jquery/cookie", "jquery/ui/dialog","$ready!"], function ($) { | |
if(! $.cookie('MailChimp')) { | |
$.cookie('MailChimp', 'shown', { expires : 30 }); // show every 30 days, adjust as required | |
$("#MailChimp").uiDialog({ | |
draggable: false, | |
preventScroll: true, | |
closeOnEscape: true, | |
modal: true, | |
width: 500, | |
open: function(event, ui) { | |
// remove titlebar | |
$("#MailChimp").siblings('div.ui-dialog-titlebar').remove(); | |
// close when clicking the overlay | |
$('.ui-widget-overlay').bind('click', function() { | |
$("#MailChimp").dialog('close'); | |
}); | |
}, | |
close: function(event, ui) { } | |
}); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment