Bootstrap 5 Confirm Button Examples

A jQuery plugin that helps create highly customizable confirmation dialog boxes using Bootstrap 5's modal component.

Dummy button that asks for confirmation but does nothing.

The "confirm" attribute is set.

Simple button that shows an alert upon confirming.

The "confirm" attribute is set, and a click handler is also set.

Pair of buttons that have onclick property and other jquery click handlers

The "confirm" attribute is set for each button, and they have click handlers and onclick handler.

Form that asks for confirmation prior to submitting

The "confirm" attribute is set to the submit button.

Custom dialog

A bootstrap modal dialog is created. The "confirm" attribute is set to empty, and the data-dialog is set to a selector that obtains the dialog; then the data-confirmbtn is set to a selector to get the "save" button from the dialog.

Using in a link

The "confirm" attribute is set to the <a> tag

clickme clickme

Using in a list

The "confirm" attribute is set to the different <li> items.

Using in an image

The "confirm" attribute is set to the svg image.

Touch me Touch me