Home > Code Examples > Twitter Bootstrap Dynamic Modal Confirmation Box jQuery Plugin

Twitter Bootstrap Dynamic Modal Confirmation Box jQuery Plugin


A simple demo of a dynamic Confirm / Warning Modal box with Bootstrap, allowing for custom actions and content with ease.

Example 1:

Default option will call the href you click on if you “OK” in the modal.

Usage: <a href=”yourlink” data-action=”confirm”>

$('[data-action="confirm"]').ConfirmWarning();

01-Example

Example 2:

Overriding the default copy in the modal.

$('[data-action="confirm"]').ConfirmWarning({
            Header: "Override Header Text",
            Body: "Override Body Text. Are you sure you wish to visit this?",
            ModalName: "#dymanicModal",
            Confirm: "Sure",
            Cancel: "hmm, no",
        });


02-Example

Example 3:

Overriding the default copy and “OK” action in the modal.

Usage: <a href=”yourlink” data-action=”confirm”>

$('[data-action="confirm"]').ConfirmWarning({
         Header: "Override Header ALERT",
         Body: "Override body text Are you sure you wish to ALERT this?",
         OK: function () {
                    alert("Hello");
                    return false;
                }
});

03-Example

Download example (ConfirmWarning.zip)

Categories: Code Examples Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment