1/*!
2Mailchimp Ajax Submit
3jQuery Plugin
4Author: Siddharth Doshi
5
6Use:
7===
8$('#form_id').ajaxchimp(options);
9
10- Form should have one <input> element with attribute 'type=email'
11- Form should have one label element with attribute 'for=email_input_id' (used to display error/success message)
12- All options are optional.
13
14Options:
15=======
16options = {
17 language: 'en',
18 callback: callbackFunction,
19 url: 'http://blahblah.us1.list-manage.com/subscribe/post?u=5afsdhfuhdsiufdba6f8802&id=4djhfdsh99f'
20}
21
22Notes:
23=====
24To get the mailchimp JSONP url (undocumented), change 'post?' to 'post-json?' and add '&c=?' to the end.
25For e.g. 'http://blahblah.us1.list-manage.com/subscribe/post-json?u=5afsdhfuhdsiufdba6f8802&id=4djhfdsh99f&c=?',
26*/
27
28(function ($) {
29 'use strict';
30
31 $.ajaxChimp = {
32 responses: {
33 'We have sent you a confirmation email' : 0,
34 'Please enter a value' : 1,
35 'An email address must contain a single @' : 2,
36 'The domain portion of the email address is invalid (the portion after the @: )' : 3,
37 'The username portion of the email address is invalid (the portion before the @: )' : 4,
38 'This email address looks fake or invalid. Please enter a real email address' : 5
39 },
40 translations: {
...
</html>