HTML JavaScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples fix event after Apr 3, 2018
images grunt generate homepage Mar 30, 2018
.gitignore
Gruntfile.js
README.md Update README.md Apr 4, 2018
bootstrap-confirm-button.min.js fix event after Apr 3, 2018
bootstrap-confirm-button.src.js
index.html
index.tmpl.html grunt generate homepage Mar 30, 2018
license.txt support dataattribu config Aug 7, 2017
package.json

README.md

Bootstrap Confirm Button

A simple button to comfirm a task. Instead of using rude modals that interrupt a user's workflow, let's use a inline unobtrusive button instead. Designed especially for devices with small screen.

Compatible with Bootstrap 3.3.7!

Ispired by: http://eli.eliandlyndi.com/2011/10/10/using-jquery-to-provide-an-inline-confirmation-on-buttons/

Demo

Events

Event Data Description
'confirm:before' {} fired at first click over button
'confirm:expired' {} fired after button is auto hidden

Usage:

<a class="btn btn-primary btn-delete-item">Delete</a>
$('.btn-delete-item').btsConfirmButton("I'm sure!", function(e) {
	console.log('Item deleted!');
});

advanced configuration:

$('.btn-delete-item').btsConfirmButton({
		msg: "Confirm Deletion",
		timeout: 3000,
		className: 'btn-danger'
	}, function(e) {
	console.log('Item deleted!');
});

Image

Source:

Github NPM