form-prevent-submit
v1.0.1
Published
Prevent multiple submit on form
Downloads
9
Readme
form-prevent-submit
Prevent multiple submit on form
Installation
npm i -S form-prevent-submit
Options
disableButton
- (Defaulttrue
) Disable the submit buttondisabledClass
- (Defaultdisabled
) Prevent if button has this classloadingClass
- (Defaultloading
) Class added on submit on the button
Usage
import formPreventSubmit from 'form-prevent-submit'
const $form = formPreventSubmit($('form.prevent-submit'), {
// options ...
})
Reset
$form.resetPrevent()