一个可自定义的 MailChimp ajax 插件,适用于 jQuery
A customizable MailChimp ajax plugin for jQuery, provides an easy and lightweight way to let your users sign up to your MailChimp list.
Choose one of the following methods:
Download source files
Git clone
git clone https://github.com/fabioquarantini/formchimp.gitBower
bower install formchimpCreate a form with the required attributes ( form action and input with name attribute. Where do i find them? )
Email*:
Subscribe
Include jQuery:
Include plugin's code:
Call the plugin:
$(".form-selector").formchimp();FormChimp accepts settings from an object of key/value pairs.
$(".form-selector").formchimp({
key: value,
key: value
});Selector: Declare where the new element, containing the messages from Mailchimp will be appended to.
Default: $(this)
String: Set the button selector.
Default: $form.find('[type="submit"]')
String: The message to be written on the submit button after a successful subscription.
Default: ''
Boolean: Activate debug message in console.
Default: false
String: Set custom error message given when return an error.
Default: ''
Function: Callback that fires on MailChimp success.
Default: function() {}
Function: Callback that fires on MailChimp error.
Default: function() {}
Selector: Declare custom element in page for message output. (Set different classes for multiple sign-up forms)
Default: mc-response
String: Set a custom success message.
Default: ''
String: The mailchip list subscription url, to get the JSONP address just change post to post-json and append &c=? at the end.
Default: form action attribute
These event hooks fire at the same time as their corresponding callbacks (ie. onMailChimpSuccess & onMailChimpSuccess)
mailChimpSuccess : This event is triggered on Mailchip success
mailChimpError : This event is triggered on Mailchip errors
$( document ).on( 'mailChimpSuccess', function() {
// Your code here
});暂无开放 Issues,或尚未同步最近议题。