This package has been deprecated

Author message:

https://www.npmjs.com/package/b-components-js

bootstrap-modal-js

2.0.1 • Public • Published

bootstrap-modal-js

Currently supports bootstrap v5.1.2

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).

Package Sidebar

Install

npm i bootstrap-modal-js

Weekly Downloads

59

Version

2.0.1

License

MIT

Unpacked Size

1.1 MB

Total Files

12

Last publish

Collaborators

  • zhangchenglin