Giter Club home page Giter Club logo

bootstrap-confirm-button's Introduction

Bootstrap Confirm Button

npm version

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

bootstrap-confirm-button's People

Contributors

hacko-npacko avatar stefanocudini avatar tunaitis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bootstrap-confirm-button's Issues

add undo functionality

create third step that allow user to undo the confirmation choice.

show another fixed alert message having a button wuth UNDO action

create a new event to this

Events management

might be useful to include event management.
Few events:

  • confirm (passing response in event object)
  • pre-confirm
  • post-confirm
  • expire-confirm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.