bootstrap-show-modal

A jQuery plugin wrapper around Bootstrap 4 modals, to create modals dynamic in JavaScript.

GitHub repository and documentation

Examples

$.showModal({title: "Hello World!", body: "A very simple modal dialog without buttons."})
$.showAlert({modalClass: "fade", title: "Hi", body: "Please press ok, if you like or dislike cookies."})
$.showConfirm({
    title: "Please confirm", body: "Do you like cats?", textTrue: "Yes", textFalse: "No",
    confirmed: function (result) {
        if (result) {
            $.showAlert({title: "Result: " + result, body: "You like cats."})
        } else {
            $.showAlert({title: "Result: " + result, body: "You don't like cats."})
        }
    },
    hidden: function () {
        console.log("The dialog was hidden.")
    }
})