An open API service indexing awesome lists of open source software.

https://github.com/thomasdev-de/jquery-bs-confirm

A small JQuery plugin that creates a confirmation dialog using the bootstrap modal.
https://github.com/thomasdev-de/jquery-bs-confirm

bootstrap confirm dialog jquery lightweight modal

Last synced: 4 months ago
JSON representation

A small JQuery plugin that creates a confirmation dialog using the bootstrap modal.

Awesome Lists containing this project

README

        

# jquery-bs-confirm

A small JQuery plugin that creates a confirmation dialog using the bootstrap modal.

![](/demo/img/dialog.png)

## options

| property | type | description | default |
|----------------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------|
| dialog | string | Additional classes that can be added to the modal-dialog element | `''` |
| showHeader | bool | Here you can specify whether the modal-header element should be displayed or not. | `true` |
| title | string\|html | If the header is to be displayed, the header text can be specified here. | `'Please confirm this action'` |
| message | string\|html | This is where the modal body text is defined. | `'Are they sure they want to do this action?'` |
| animationClass | string | Here the animation can be defined by the appear. For example, you can add classes from animate.css. | `'fade'` |
| confirmText | string | The text of the confirmation button | `'confirm'` |
| cancelText | string | The text of the cancel button | `'cancel'` |
| onConfirm | function | The function is triggered upon confirmation. | `() => {}` |
| onCancel | function | The function is triggered when you cancel. | `() => {}` |
| onComplete | function | The function is triggered in both cases and returns the parameter isConfirmed to know if confirmed or cancelled. | `({bool} isConfirmed) => {}` |
| onShow | function | This event fires immediately when the show instance method is called. If caused by a click, the clicked element is available as the relatedTarget property of the event. | `() => {}` |
| onShown | function | This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). If caused by a click, the clicked element is available as the relatedTarget property of the event. | `() => {}` |
| onHide | function | This event is fired immediately when the hide instance method has been called. | `() => {}` |
| onHidden | function | This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete). | `() => {}` |