All Projects → shaack → Bootstrap Show Modal

shaack / Bootstrap Show Modal

Licence: mit
A Bootstrap 4 / jQuery plugin wrapper, to create modals dynamically in JavaScript

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Bootstrap Show Modal

Bdialog
Extend the Bootstrap Modal features, making dialog more functions and easier to use, dialog type including modal, alert, mask and toast types
Stars: ✭ 174 (+357.89%)
Mutual labels:  jquery-plugin, dialog, modal, bootstrap, jquery
Gijgo
Gijgo - Free Javascript Controls
Stars: ✭ 424 (+1015.79%)
Mutual labels:  jquery-plugin, dialog, modal, jquery
Ax5ui Kernel
Javascript UI Framework - AX5UI - Kernel Module
Stars: ✭ 164 (+331.58%)
Mutual labels:  dialog, modal, bootstrap, jquery
Bootstrap
Open Source JS plugins
Stars: ✭ 13 (-65.79%)
Mutual labels:  jquery-plugin, bootstrap, jquery
Bootstrap Input Spinner
A Bootstrap 4 / jQuery plugin to create input spinner elements for number input
Stars: ✭ 176 (+363.16%)
Mutual labels:  jquery-plugin, bootstrap, jquery
Bs grid
Bootstrap Datagrid
Stars: ✭ 184 (+384.21%)
Mutual labels:  jquery-plugin, bootstrap, jquery
Ax5ui Grid
Javascript UI Component - GRID ( Excel Grid, jqGrid, angularjs grid, jquery grid, SlickGrid, ag-grid gridify)
Stars: ✭ 102 (+168.42%)
Mutual labels:  jquery-plugin, bootstrap, jquery
E107
e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
Stars: ✭ 272 (+615.79%)
Mutual labels:  bootstrap, jquery, bootstrap4
Bootstrap Checkbox
A checkbox component based on Bootstrap framework.
Stars: ✭ 214 (+463.16%)
Mutual labels:  jquery-plugin, bootstrap, jquery
Bootstrap Submenu
Bootstrap sub-menus
Stars: ✭ 442 (+1063.16%)
Mutual labels:  jquery-plugin, bootstrap, jquery
Mobirise
Free Website Builder for Bootstrap 4 & AMP
Stars: ✭ 664 (+1647.37%)
Mutual labels:  bootstrap, jquery, bootstrap4
Jquery Smartwizard
The awesome jQuery step wizard plugin
Stars: ✭ 635 (+1571.05%)
Mutual labels:  jquery-plugin, bootstrap, jquery
Gridstrap.js
gridstrap.js is a jQuery plugin designed to take Bootstrap's CSS grid system and turn it into a managed draggable and resizeable grid while truely maintaining its responsive behaviour.
Stars: ✭ 32 (-15.79%)
Mutual labels:  jquery-plugin, bootstrap, jquery
Jquery Confirm
A multipurpose plugin for alert, confirm & dialog, with extended features.
Stars: ✭ 1,776 (+4573.68%)
Mutual labels:  jquery-plugin, dialog, jquery
Bootstrap Msg
The jQuery plugin for showing message with Bootstrap alert classes
Stars: ✭ 10 (-73.68%)
Mutual labels:  jquery-plugin, bootstrap, jquery
Toast
A Bootstrap 4.2+ jQuery plugin for the toast component
Stars: ✭ 121 (+218.42%)
Mutual labels:  jquery-plugin, bootstrap, bootstrap4
Tableexport
The simple, easy-to-implement library to export HTML tables to xlsx, xls, csv, and txt files.
Stars: ✭ 781 (+1955.26%)
Mutual labels:  jquery-plugin, bootstrap, jquery
Popup Maker
Popup Maker plugin for WordPress
Stars: ✭ 87 (+128.95%)
Mutual labels:  jquery-plugin, modal, jquery
Bpage
Based on bootstrap style, static page jump can also be asynchronous page processing pagination plugin
Stars: ✭ 96 (+152.63%)
Mutual labels:  jquery-plugin, bootstrap, jquery
Bootstrap Fileinput
An enhanced HTML 5 file input for Bootstrap 5.x/4.x./3.x with file preview, multiple selection, and more features.
Stars: ✭ 5,097 (+13313.16%)
Mutual labels:  jquery-plugin, bootstrap, jquery

bootstrap-show-modal

jQuery plugin to create bootstrap 4 modals in pure JavaScript.

Demo Page

Installation

npm install bootstrap-show-modal

Or just download this repository and include src/bootstrap-show-modal.js.

Usage

Simple Modal

$.showModal({title: "Hello World!", body: "A very simple modal dialog without buttons."})

Alert Dialog

$.showAlert({title: "Hi", body: "Please press ok, if you like or dislike cookies."})

Confirm Dialog

$.showConfirm({
    title: "Please confirm", body: "Do you like cats?", textTrue: "Yes", textFalse: "No",
    onSubmit: function (result) { // callback on confirm
        if (result) {
            $.showAlert({title: "Result: " + result, body: "You like cats."})
        } else {
            $.showAlert({title: "Result: " + result, body: "You don't like cats."})
        }
    },
    onDispose: function() {
        console.log("The confirm dialog vanished")
    }
})

Properties

props = {
    title: "", // the dialog title html
    body: "", // the dialog body html
    footer: "", // the dialog footer html (mainly used for buttons)
    modalClass: "fade", // Additional css for ".modal", "fade" for fade effect
    modalDialogClass: "", // Additional css for ".modal-dialog", like "modal-lg" or "modal-sm" for sizing
    options: null, // The Bootstrap modal options as described here: https://getbootstrap.com/docs/4.0/components/modal/#options
    // Events:
    onCreate: null, // Callback, called after the modal was created
    onShown: null, // Callback, called after the modal was shown and completely faded in
    onDispose: null, // Callback, called after the modal was disposed
    onSubmit: null // Callback of $.showConfirm(), called after yes or no was pressed
}

See the Bootstrap 4 Modal documentation for possible values of options, modalClass and modalDialogClass.

Minified version

I don't provide a minified version because I think it should be up to the using programmer to create minified versions, with all the used script sources concatenated to one file.

But, if you want it, it is easy to create your minified version with uglify: https://www.npmjs.com/package/uglify-js

Just install uglify

npm install uglify-js -g

and then in the src-folder

uglifyjs bootstrap-show-modal.js --compress --mangle > bootstrap-show-modal.min.js

Browser support

It works in all modern browsers and in the Internet Explorer. Not tested with IE < 11.

More Bootstrap extensions from shaack.com

You may want to check out our other Bootstrap and HTML extensions

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].