Buttonguard is a JQuery plugin that makes users click a button twice to submit a form
| 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 |
<button class="btn btn-primary" id="AButton">Click</button>$(function() {
$("#AButton").buttonguard({
duration: 5000,
oldClass: 'btn-primary',
newClass: 'btn-danger'
});
});