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();
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", });
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; } });
Download example (ConfirmWarning.zip)
Categories: Code Examples
Bootstrap, JavaScript
Comments (0)
Trackbacks (0)
Leave a comment
Trackback