0.1.0 • Published 9 years ago

tamia-ajax-form v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Tâmia Ajax Form

Build Status

Forms ajaxification for Tâmia.

Installation

$ npm install --save-dev tamia-ajax-form

Usage

ajaxForm({
  form: formElem,
  url: 'http://example.list-manage.com/subscribe/post',
  type: 'jsonp',
  jsonpCallback: 'c',
  onSuccess: data => {
    console.log('Yep :-)');
    return {
      result: 'success',
    };
  },
  onError: data => {
    console.log('Nope :-(');
    return {
      message: data.message,
    };
  },
});

License

The MIT License, see the included License.md file.