JQuery plugin that makes users click a button twice to submit a form
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
Readme.md
example.gif
jquery.buttonguard.js

Readme.md

Buttonguard

Buttonguard is a JQuery plugin that makes users click a button twice to submit a form

Example

Requires

Options

Option Default Value Description
newHtml Confirm What the button will display after being clicked
oldClass The CSS class to change from. newClass also needs to be set
newClass The CSS class to change to. oldClass also needs to be set
duration The length of time in ms that the button will be active after the first click. If not set the button will stay active

Usage example

<button class="btn btn-primary" id="AButton">Click</button>
$(function() {
	$("#AButton").buttonguard({
		duration: 5000,
		oldClass: 'btn-primary',
		newClass: 'btn-danger'
	});
});