{"id":13549176,"url":"https://github.com/scdoshi/jquery-ajaxchimp","last_synced_at":"2026-02-23T10:14:25.427Z","repository":{"id":8301820,"uuid":"9844886","full_name":"scdoshi/jquery-ajaxchimp","owner":"scdoshi","description":"Use ajax for your mailchimp form","archived":false,"fork":false,"pushed_at":"2019-10-06T01:52:46.000Z","size":395,"stargazers_count":520,"open_issues_count":39,"forks_count":135,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-19T04:23:46.671Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://plugins.jquery.com/ajaxchimp/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scdoshi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-03T21:21:46.000Z","updated_at":"2025-03-18T07:48:20.000Z","dependencies_parsed_at":"2022-08-07T02:00:59.242Z","dependency_job_id":null,"html_url":"https://github.com/scdoshi/jquery-ajaxchimp","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scdoshi%2Fjquery-ajaxchimp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scdoshi%2Fjquery-ajaxchimp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scdoshi%2Fjquery-ajaxchimp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scdoshi%2Fjquery-ajaxchimp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scdoshi","download_url":"https://codeload.github.com/scdoshi/jquery-ajaxchimp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246905105,"owners_count":20852812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:01:19.090Z","updated_at":"2025-10-22T20:22:57.135Z","avatar_url":"https://github.com/scdoshi.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# ajaxChimp\n\nAjaxChimp is a jQuery plugin that lets you ajaxify your mailchimp form.\n\nUse this if you hate the jarring transition to the mailchimp website upon submitting an email address to mailchimp.\n\n**Note**: This relies on an undocumented feature at mailchimp that uses JSONP to allow cross-domain ajax to work. You have been warned. (It has however, been around for at least 3 years that I know of, and probably more.)\n\n\n## Install\n\nJust add the script to your webpage (along with jQuery ofcourse). Get it here:\n\n```\ncurl -O https://raw.githubusercontent.com/scdoshi/jquery-ajaxchimp/master/jquery.ajaxchimp.js\n```\n\n#### bower\n\n```\nbower install ajaxchimp\n```\n\n\n## Requirements\n\n* jQuery\n\n**Note**: Developed with 1.9.1, but it should work with earlier versions. If it does or does not work with a particular version, please open an issue on github.\n\n## Use\n\n#### On the mailchimp form element\n\n```js\n$('form-selector').ajaxChimp();\n```\n\n## Label\n\nIf a label element is included in the form for the email input, then the success or error message will be displayed in it. A `valid` or `error` class will also be added accordingly.\n\n#### Example Form\n\n```html\n    \u003cform id=\"mc-form\"\u003e\n        \u003cinput id=\"mc-email\" type=\"email\" placeholder=\"email\"\u003e\n        \u003clabel for=\"mc-email\"\u003e\u003c/label\u003e\n        \u003cbutton type=\"submit\"\u003eSubmit\u003c/button\u003e\n    \u003c/form\u003e\n```\n\n```js\n$('#mc-form').ajaxChimp({\n    url: 'http://blahblah.us1.list-manage.com/subscribe/post?u=5afsdhfuhdsiufdba6f8802\u0026id=4djhfdsh9'\n});\n```\n\n\n## Options\n\n### Callback\n\nOptionally, you can specify a callback with either method to run after the\najax query to mailchimp succeeds or fails.\n\n```js\n$('form-selector').ajaxChimp({\n    callback: callbackFunction\n});\n```\n\nThe JSONP response from mailchimp will be passed to the callback function\n\n```js\nfunction callbackFunction (resp) {\n    if (resp.result === 'success') {\n        // Do stuff\n    }\n}\n```\n\n### URL\n\nYou can specify the mailchimp URL to post to (or override the url provided on the form element)\n\n```js\n$('form-selector').ajaxChimp({\n    url: 'mailchimp-post-url'\n});\n```\n\nThe mailchimp post url will look like this:\n\n```\nhttp://blahblah.us1.list-manage.com/subscribe/post?u=5afsdhfuhdsiufdba6f8802\u0026id=4djhfdsh99f\n```\n\n### Language Support\n\nFor success and error messages in different languages:\n\n- Specify the language as an option.\n- Include `jquery.ajaxchimp.langs.js` in the html file\n\n\n```js\n$('form-selector').ajaxChimp({\n    language: 'es'\n});\n```\n\n**Note**: If the language you want is not supported out of the box, or the translations are wrong, open a pull request with the required language and I will add it in.\n\nYou can also add custom translations just for your website:\n\n```js\n$.ajaxChimp.translations.es = {\n    'submit': 'Grabación en curso...',\n    0: 'Te hemos enviado un email de confirmación',\n    1: 'Por favor, introduzca un valor',\n    2: 'Una dirección de correo electrónico debe contener una sola @',\n    3: 'La parte de dominio de la dirección de correo electrónico no es válida (la parte después de la @:)',\n    4: 'La parte de usuario de la dirección de correo electrónico no es válida (la parte antes de la @:)',\n    5: 'Esta dirección de correo electrónico se ve falso o no válido. Por favor, introduce una dirección de correo electrónico real'\n}\n```\n\nThe mapping to english for mailchimp responses and the submit message are as follows:\n\n```js\n    // Submit Message\n    // 'submit': 'Submitting...'\n\n    // Mailchimp Responses\n    // 0: 'We have sent you a confirmation email'\n    // 1: 'Please enter a value'\n    // 2: 'An email address must contain a single @'\n    // 3: 'The domain portion of the email address is invalid (the portion after the @: )'\n    // 4: 'The username portion of the email address is invalid (the portion before the @: )'\n    // 5: 'This email address looks fake or invalid. Please enter a real email address'\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscdoshi%2Fjquery-ajaxchimp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscdoshi%2Fjquery-ajaxchimp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscdoshi%2Fjquery-ajaxchimp/lists"}