The proverbial 'Big Red Button' made with MooTools & Bootstrap 3. When activated flashes and asks to confirm or cancel an action. Requires MooTools 1.5+ / Bootstrap 3+;
// create your button: html <button href="#" class="btn btn-default btn-block btn-armed armable"> Just do it! </button> // initialise it: ```js window.addEvent('domready', function(e){ $$('.armable').armed({ text: "Confirm", btnConfirm: { text: 'Confirm action', onConfirm: function(instance){ //AB instance so you can do things like change the label and disarm instance.label.set('text', 'Action completed!'); instance.disarm('btn btn-armed btn-block btn-success disabled'); } }, btnCancel: { text: 'Cancel' },
fxOptions: { transition: 'pow:out', duration: 700 }
}); }); ```
https://buengenio.github.io/ArmedButton/
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus