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.

Simple button that shows an alert upon confirming (using jQuery)

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.

Internationalization (locally, per element) using declarative mechanism

Each of the texts in the dialog is customized for each language.

Internationalization (globally) using library configuration

Each link calls to a function that will configure the library globally

| |

Confirmation in a link

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

clickme

Confirmation of elements in a list

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

Confirmation of an image

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

Touch me

Verification button

The data-verify attribute is set and contains a bit of javascript code that returns true or elsething.

Verification button with custom dialog

A bootstrap modal dialog is created. The data-dialog is set to a selector that obtains the dialog.

Verification in other elements (e.g. links)

The verification can also be used in links, images or other elements

Go to Google
Touch me

Using verification and confirmation together

The verification can be used together with a confirmation dialog (*). It is just needed to include both data-verify and data-confirm together.

(*) Verification happens before

If wanted to confirm first, use data-verify-after-confirm, instead data-verify.

Working with verification and confirmation

In the declarative method, verification happens always before

If wanted to confirm before, it is needed the programmatical method