New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bootstrap-show-modal

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bootstrap-show-modal

jQuery plugin to create bootstrap 4 modals in pure JavaScript

  • 1.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
186
decreased by-24.7%
Maintainers
1
Weekly downloads
 
Created
Source

bootstrap-modal-dialog

jQuery plugin to create bootstrap 4 modals in pure JavaScript.

Demo Page

Installation

npm install installs bootstrap, popper.js and jQuery, needed for bootstrap modals.

Usage

Simple

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

Alert with fade effect

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

Confirm

$.showConfirm({
    title: "Please confirm", body: "Do you like cats?", textTrue: "Yes", textFalse: "No",
    confirmed: 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."})
        }
    },
    hidden: function() { // callback on hide
        console.log("The dialog was hidden.")
    }
})

Properties

props = {
    title: "", // the dialog title html
    body: "", // the dialog body html
    footer: "", // the dialog footer html (mainly used for buttons)
    created: null, // callback, called after the modal is created
    hidden: null, // callback, called after the modal is hidden 
    confirmed: null, // $.showConfirm only. callback, called after yes or no was pressed
    modalClass: "", // Additional css for ".modal", like "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
}

Also see the Bootstrap 4 Modal documentation.

Keywords

FAQs

Package last updated on 30 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc