Thank You 2020: Difference between revisions

From Donate
Jump to navigation Jump to search
Content deleted Content added
Updated email signup form
No edit summary
Line 1,014: Line 1,014:
</div><!-- End footer-legal -->
</div><!-- End footer-legal -->
</footer>
</footer>
<script>
var wmf = wmf || {};

wmf.subscribe = {
post: function() {
/* Create the iframe for the form and use it as the form's target */
var frameName = 'subscribeFrame';
var $form = $('#wmf-subscribe-form');
if ( $("iframe[name=" + frameName + "]").length === 0 ) {
var $iframe = $('<iframe style="display: none;" name="' + frameName + '"></iframe>');
$form.attr('target', $iframe.attr('name'));
$form.after($iframe);
}
$form[0].submit();
},

init: function() {
/* Prep the form */
$('#wmf-subscribe-submit').click(function() {
if ( mw.util.validateEmail( form.Email.value ) ) {
wmf.subscribe.post();
$('.wmf-subscribe-ty').show();
return false;
} else {
$('#wmf-subscribe-input-email').addClass('wmf-subscribe-haserror').focus();
$('.wmf-subscribe-error-invalidemail').show();
return false;
}
});
}
};

wmf.subscribe.init();
</script>
</body></html>
</body></html>

Revision as of 18:48, 7 January 2020

Explore our best content

The top fifteen images from Wiki Loves Monuments contain a treasure trove of the cultural heritage we all share.

Check it out

Install the Wikipedia app

Get the Wikipedia app today for the quickest way to check a fact and get answers to your questions. Downloading is easy on your phone and only takes a minute. It’s free and ad-free.

Download it now