disabler

2.0.1 • Public • Published

Disabler

Disable buttons with loading feedback. Useful for disabling form buttons to prevent submitting duplicate times.

demo

Usage

$('button').disabler({
    timeout: 50000,
    html: 'Loading...'
});

It's easy to customise the html text displayed by setting up your disabler like so:

<button type="submit" data-disabler="Saving...">Save</button>

Options

Option Type Default Description
timeout integer 50000 Number of miliseconds before re-enabling the button
html string, func keep element's text HTML to use for the element when disabled
auto bool false Whether to disable the button instantly (and not bind click events, etc)

Readme

Keywords

none

Package Sidebar

Install

npm i disabler

Weekly Downloads

2

Version

2.0.1

License

none

Unpacked Size

51.5 kB

Total Files

7

Last publish

Collaborators

  • garygreen