Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefanocudini/bootstrap-confirm-button
A simple button to confirm tasks, inline and unobtrusive confirm system
https://github.com/stefanocudini/bootstrap-confirm-button
bootstrap bootstrap-plugin button-widget javascript jquery ux
Last synced: 12 days ago
JSON representation
A simple button to confirm tasks, inline and unobtrusive confirm system
- Host: GitHub
- URL: https://github.com/stefanocudini/bootstrap-confirm-button
- Owner: stefanocudini
- License: mit
- Created: 2014-03-31T13:05:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-08-11T10:12:45.000Z (over 1 year ago)
- Last Synced: 2024-04-28T10:21:09.490Z (7 months ago)
- Topics: bootstrap, bootstrap-plugin, button-widget, javascript, jquery, ux
- Language: HTML
- Homepage: https://opengeo.tech/bootstrap-confirm-button/
- Size: 49.8 KB
- Stars: 24
- Watchers: 5
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
README
Bootstrap Confirm Button
============[![npm version](https://badge.fury.io/js/bootstrap-confirm-button.svg)](http://badge.fury.io/js/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](example.html)
# Events
| Event | Data | Description |
| ---------------- | ---- | ---------------------- |
| 'confirm:before' | {} | fired at first click over button |
| 'confirm:expired'| {} | fired after button is auto hidden |# Usage:
```html
```
```javascript
$('.btn-delete-item').btsConfirmButton("I'm sure!", function(e) {
console.log('Item deleted!');
});
```**advanced configuration:**
```javascript
$('.btn-delete-item').btsConfirmButton({
msg: "Confirm Deletion",
timeout: 3000,
className: 'btn-danger'
}, function(e) {
console.log('Item deleted!');
});```
![Image](https://raw.githubusercontent.com/stefanocudini/bootstrap-confirm-button/master/images/confirm-delete-button.png)
# Source:
[Github](https://github.com/stefanocudini/bootstrap-confirm-button)
[NPM](https://npmjs.org/package/bootstrap-confirm-button)