1.0.9 • Published 5 years ago

buttondisabler v1.0.9

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

buttondisabler

Simple and no-dependency, vanilla JavaScript package to disable submit button to avoid duplicate form submissions.

Installation and Usage

ES6 Way

npm install buttondisabler

import buttondisabler from 'buttondisabler';

new buttondisabler({
    selector: 'button[type="submit"], input[type="submit"]',
    timeout: 5000,
    text: 'Wait...'
});

Or via script tag:

<script type="application/javascript" src="lib/buttondisabler.js"></script>
new buttondisabler({
    selector: 'button[type="submit"], input[type="submit"]',
    timeout: 5000,
    text: 'Wait...'
});

If you want to use those three options as shown above with same values as above, then those are so by default so you can omit them and instead use new buttondisabler() without options.

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago