Skip to content

Instantly share code, notes, and snippets.

@clnmcgrw
Last active February 4, 2016 22:59
Show Gist options
  • Save clnmcgrw/83fd9c95c45506874c14 to your computer and use it in GitHub Desktop.
Save clnmcgrw/83fd9c95c45506874c14 to your computer and use it in GitHub Desktop.
Mailchimp AJAX Submit w/ JSONP
$('#form-selector').submit( function(event) {
event.preventDefault();
//copy the mailchimp formm action URL, and change "post" parameter to "post-json"
var submitUrl = $(this).data('submit-url');
$.getJSON( submitUrl+"&c=?", $(this).serialize(), function(data) {
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment