1.0.0 • Published 8 years ago

fancy-ajax-button v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Fancy Ajax Button

A button I use in my home automation interface.

It sends a request to a given URL, displays a loading animation while in progress and sets an active class if it was not set before.

It has no dependencies and is written in CoffeeScript (compiled to JavaScript)

Use

It accepts 3 parameters.

  • Selector
  • URL
  • Is active?

In the browser

It is availiable via the window object as SubmitButton

new SubmitButton('#my-button', 'http://example.com', true)

Node/CommonJS

var SubmitButton = require('fancy-ajax-button');
new SubmitButton('#my-button', 'http://example.com', true)
1.0.0

8 years ago