bootstrap-modal-js
Bootstrap modal
Last updated 14 days ago by zhangchenglin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bootstrap-modal-js 
SYNC missed versions from official npm registry.

bootstrap-modal-js

Currently supports bootstrap v5 beta2

Bootstrap 5 components "Modal"

Currently relying on Bootstrap v5, because it is a function package of Bootstrap modal.

Supports arbitrary calls of 9 parameters, supports callback functions based on modal events.


If it helps you, please star this repository


Demo

https://zhangchenglin.github.io/bootstrap-modal-js/demo.html


GitHub Stars GitHub Issues GitHub Release GitHub License

NPM package info NPM package down info

NPM Version npm download number npm download number npm download number npm download number npm License

taonpm version taonpm download number

cnpm version cnpm download number

jsDelivr jsDelivr hits (npm) day jsDelivr hits (npm) week jsDelivr hits (npm) month jsDelivr hits (npm) year

UNPKG minified size


Table of Contents

How to use it
How to install
CDN
Parameter Description
Donate
License

How to use it

<script src="https://cdn.jsdelivr.net/npm/bootstrap-modal-js/dist/bootstrap-modal-js.min.js"></script>
<script src="./dist/bootstrap-modal-js.js"></script>

<a href="javascript:;" onclick="bootstrapModalJs(parameter)">text</a>

OR

<a href="javascript:;" id="xx">text</a>

<script src="https://cdn.jsdelivr.net/npm/bootstrap-modal-js/dist/bootstrap-modal-js.min.js"></script>
<script src="./dist/bootstrap-modal-js.js"></script>
<script>
    const xx = document.querySelector("#xx");
    xx.addEventListener("click", function () {
        bootstrapModalJs(parameter);
    }
</script>

OR MORE

How to install

npm i bootstrap-modal-js --save

OR

cnpm i bootstrap-modal-js --save

CDN

  • jsDelivr
<script src="https://cdn.jsdelivr.net/npm/bootstrap-modal-js/dist/bootstrap-modal-js.min.js"></script>

OR

<script src="https://cdn.jsdelivr.net/npm/bootstrap-modal-js/dist/bootstrap-modal-js.js"></script>
  • UNPKG

View all versions

https://unpkg.com/bootstrap-modal-js/

After the browser parses, get the latest version address

https://unpkg.com/bootstrap-modal-js

Parameter Description

bootstrapModalJs(title, body, footer, ModalSizes, VerticallyCentered, LongContentType, EventType, CallbackFunction, Options)

Return Values

type such as Description
String 1552756356601 modal element number

  • title

Type: String | Function | Function HTMLElement

Default value: undefined

Description: If you want to add a child element to the '.modal-header' element, use the Function HTMLElement.

说明: 如果要向 ".modal-header" 元素添加子元素,请使用 Function HTMLElement。


  • body

Type: String | Function | Function HTMLElement

Default value: undefined

Description:


  • footer

Type: String | Function | Function HTMLElement

Default value: undefined

Description:


  • ModalSizes

Type: String

Default value: undefined

Description:

parameter
sm
lg
xl
full
full-sm
full-md
full-lg
full-xl
full-xxl

  • VerticallyCentered

Type: Boolean

Default value: false

Description:

parameter
true
false

  • LongContentType

Type: Boolean

Default value: false

Description:

parameter
true
false

  • EventType

Type: String

Default value: undefined

Description:

parameter
show
shown
hide
hidden

  • CallbackFunction

Type: Function

Default value: undefined

Description:


  • Options

Type: Object

Default value:

Description: Bootstrap Modal options

parameter default value (boolean) other
backdrop true false | "static"
keyboard true false
focus true false
show true false

Donate

Method (priority) type
alipay (支付宝) QR code
QQ QR code
WeChat (微信)
PayPal (贝宝) PayPal.Me

License

MIT

under the MIT License (license terms are at https://opensource.org/licenses/MIT).

Current Tags

  • 2.0.0-beta2                                ...           latest (14 days ago)

24 Versions

  • 2.0.0-beta2                                ...           14 days ago
  • 2.0.0-beta1                                ...           2 months ago
  • 2.0.0-alpha2                                ...           5 months ago
  • 2.0.0-alpha1                                ...           9 months ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           2 years ago
  • 1.0.0-beta.1                                ...           2 years ago
  • 1.0.0-beta                                ...           2 years ago
  • 0.0.1-beta.2                                ...           2 years ago
  • 0.0.1-beta.1                                ...           2 years ago
  • 0.0.1-beta                                ...           2 years ago
  • 0.0.1-alpha.beta.8 [deprecated]           ...           2 years ago
  • 0.0.1-alpha.beta.7 [deprecated]           ...           2 years ago
  • 0.0.1-alpha.beta.6 [deprecated]           ...           2 years ago
  • 0.0.1-alpha.beta.5 [deprecated]           ...           2 years ago
  • 0.0.1-alpha.beta.4 [deprecated]           ...           2 years ago
  • 0.0.1-alpha.beta.3 [deprecated]           ...           2 years ago
  • 0.0.1-alpha.beta.2 [deprecated]           ...           2 years ago
  • 0.0.1-alpha.beta.1 [deprecated]           ...           2 years ago
  • 0.0.1-alpha.beta [deprecated]           ...           2 years ago
  • 0.0.1-alpha.3 [deprecated]           ...           2 years ago
  • 0.0.1-alpha.2 [deprecated]           ...           2 years ago
  • 0.0.1-alpha.1 [deprecated]           ...           2 years ago
  • 0.0.1-alpha [deprecated]           ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 23
Dependencies (1)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |