Effortlessly submit forms using jQuery, AJAX, and JSON

At just over 200 lines of code, you'll never want to deal with AJAX-based form submission any other way.

Features

  • Makes regular HTML forms AJAX-capable.
  • Minimal markup.
  • Handles form serialization so you don't have to.
  • Shows/hides a loader and message if you provide them.
  • Highlights invalid fields.
  • Callbacks for success, fail, before, and after.
  • API to disable/enable all form inputs.
  • API to reset the form (including loader, message, and invalid fields)
  • Compact! (about 200 lines)

Example

Here's a minimal example of the plugin in action. For more advanced usage, refer to the docs.

$('form').ajaxSubmit({
    success: function(res) {
        console.log(res);
    }
});

Installing with NPM

npm install --save @claviska/jquery-ajaxSubmit

Docs / Downloading / Contributing

You can read the docs, download the source, and contribute to the project on GitHub. Please submit issues to the issue tracker and questions to StackOverflow.

This plugin is licensed under the MIT license.

Author avatar

About the author

New Hampshirite building web apps in Florida. Creator of Surreal CMS, Postleaf, and DirtyMarkup.

Need to get in touch? Catch me on Twitter.