精品久久久久久亚洲精品_成人午夜网站_www日本高清_亚洲精品久久久久午夜福

JavaScript

Bring Bootstrap to life with our optional JavaScript plugins. Learn about each plugin, our data and programmatic API options, and more.

Individual or compiled

Plugins can be included individually (using Bootstrap’s individual js/dist/*.js), or all at once using bootstrap.js or the minified bootstrap.min.js (don’t include both).

If you use a bundler (Webpack, Rollup…), you can use /js/dist/*.js files which are UMD ready.

Using Bootstrap as a module

We provide a version of Bootstrap built as ESM (bootstrap.esm.js and bootstrap.esm.min.js) which allows you to use Bootstrap as a module in your browser, if your targeted browsers support it.

<script type="module">
import { Toast } from 'bootstrap.esm.min.js'

Array.from(document.querySelectorAll('.toast'))
.forEach(toastNode => new Toast(toastNode))
</script>

Incompatible plugins

Due to browser limitations, some of our plugins, namely Dropdown, Tooltip and Popover plugins, cannot be used in a <script> tag with module type because they depend on Popper. For more information about the issue see here.

Dependencies

Some plugins and CSS components depend on other plugins. If you include plugins individually, make sure to check for these dependencies in the docs.

Our dropdowns, popovers and tooltips also depend on Popper.

Still want to use jQuery? It’s possible!

Bootstrap 5 is designed to be used without jQuery, but it’s still possible to use our components with jQuery. If Bootstrap detects jQuery in the window object it’ll add all of our components in jQuery’s plugin system; this means you’ll be able to do $('[data-bs-toggle="tooltip"]').tooltip() to enable tooltips. The same goes for our other components.

Data attributes

Nearly all Bootstrap plugins can be enabled and configured through HTML alone with data attributes (our preferred way of using JavaScript functionality). Be sure to only use one set of data attributes on a single element (e.g., you cannot trigger a tooltip and modal from the same button.)

Selectors

Currently to query DOM elements we use the native methods querySelector and querySelectorAll for performance reasons, so you have to use valid selectors. If you use special selectors, for example: collapse:Example be sure to escape them.

Events

Bootstrap provides custom events for most plugins' unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and its past participle form (ex. shown) is triggered on the completion of an action.

All infinitive events provide preventDefault() functionality. This provides the ability to stop the execution of an action before it starts. Returning false from an event handler will also automatically call preventDefault().

var myModal = document.getElementById('myModal')

myModal.addEventListener('show.bs.modal', function (event) {
if (!data) {
return event.preventDefault() // stops modal from being shown
  }
})

jQuery events

Bootstrap will detect jQuery if jQuery is present in the window object and there is no data-bs-no-jquery attribute set on <body>. If jQuery is found, Bootstrap will emit events thanks to jQuery’s event system. So if you want to listen to Bootstrap’s events, you’ll have to use the jQuery methods (.on, .one) instead of addEventListener.

$('#myTab a').on('shown.bs.tab', function () {
// do something...
})

Programmatic API

All constructors accept an optional options object or nothing (which initiates a plugin with its default behavior):

var myModalEl = document.getElementById('myModal')

var modal = new bootstrap.Modal(myModalEl) // initialized with defaults
var modal = new bootstrap.Modal(myModalEl, { keyboard: false }) // initialized with no keyboard

If you’d like to get a particular plugin instance, each plugin exposes a getInstance method. In order to retrieve it directly from an element, do this: bootstrap.Popover.getInstance(myPopoverEl).

CSS selectors in constructors

You can also use a CSS selector as the first argument instead of a DOM element to initialize the plugin. Currently the element for the plugin is found by the querySelector method since our plugins support a single element only.

var modal = new bootstrap.Modal('#myModal')
var dropdown = new bootstrap.Dropdown('[data-bs-toggle="dropdown"]')

Asynchronous functions and transitions

All programmatic API methods are asynchronous and return to the caller once the transition is started but before it ends.

In order to execute an action once the transition is complete, you can listen to the corresponding event.

var myCollapseEl = document.getElementById('#myCollapse')

myCollapseEl.addEventListener('shown.bs.collapse', function (event) {
// Action to execute once the collapsible area is expanded
})

In addition a method call on a transitioning component will be ignored.

var myCarouselEl = document.getElementById('myCarousel')
var carousel = bootstrap.Carousel.getInstance(myCarouselEl) // Retrieve a Carousel instance

myCarouselEl.addEventListener('slid.bs.carousel', function (event) {
carousel.to('2') // Will slide to the slide 2 as soon as the transition to slide 1 is finished
})

carousel.to('1') // Will start sliding to the slide 1 and returns to the caller
carousel.to('2') // !! Will be ignored, as the transition to the slide 1 is not finished !!

Default settings

You can change the default settings for a plugin by modifying the plugin’s Constructor.Default object:

// changes default for the modal plugin's `keyboard` option to false
bootstrap.Modal.Default.keyboard = false

No conflict (only if you use jQuery)

Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call .noConflict on the plugin you wish to revert the value of.

var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
$.fn.bootstrapBtn = bootstrapButton // give $().bootstrapBtn the Bootstrap functionality

Version numbers

The version of each of Bootstrap’s plugins can be accessed via the VERSION property of the plugin’s constructor. For example, for the tooltip plugin:

bootstrap.Tooltip.VERSION // => "5.0.0-beta3"

No special fallbacks when JavaScript is disabled

Bootstrap’s plugins don’t fall back particularly gracefully when JavaScript is disabled. If you care about the user experience in this case, use <noscript> to explain the situation (and how to re-enable JavaScript) to your users, and/or add your own custom fallbacks.

Third-party libraries

Bootstrap does not officially support third-party JavaScript libraries like Prototype or jQuery UI. Despite .noConflict and namespaced events, there may be compatibility problems that you need to fix on your own.

Sanitizer

Tooltips and Popovers use our built-in sanitizer to sanitize options which accept HTML.

The default allowList value is the following:

var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i
var DefaultAllowlist = {
// Global attributes allowed on any supplied element below.
  '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
a: ['target', 'href', 'title', 'rel'],
area: [],
b: [],
br: [],
col: [],
code: [],
div: [],
em: [],
hr: [],
h1: [],
h2: [],
h3: [],
h4: [],
h5: [],
h6: [],
i: [],
img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
li: [],
ol: [],
p: [],
pre: [],
s: [],
small: [],
span: [],
sub: [],
sup: [],
strong: [],
u: [],
ul: []
}

If you want to add new values to this default allowList you can do the following:

var myDefaultAllowList = bootstrap.Tooltip.Default.allowList

// To allow table elements
myDefaultAllowList.table = []

// To allow td elements and data-bs-option attributes on td elements
myDefaultAllowList.td = ['data-bs-option']

// You can push your custom regex to validate your attributes.
// Be careful about your regular expressions being too lax
var myCustomRegex = /^data-my-app-[\w-]+/
myDefaultAllowList['*'].push(myCustomRegex)

If you want to bypass our sanitizer because you prefer to use a dedicated library, for example DOMPurify, you should do the following:

var yourTooltipEl = document.getElementById('yourTooltip')
var tooltip = new bootstrap.Tooltip(yourTooltipEl, {
sanitizeFn: function (content) {
return DOMPurify.sanitize(content)
}
})
返回頂部
精品久久久久久亚洲精品_成人午夜网站_www日本高清_亚洲精品久久久久午夜福

      9000px;">

          天天色 色综合| 99久精品国产| 一本到高清视频免费精品| 久久久久久一级片| 97精品超碰一区二区三区| 一区二区三区四区在线播放 | 亚洲午夜国产一区99re久久| 欧洲亚洲精品在线| 亚洲成人免费av| 久久婷婷国产综合国色天香| 成人天堂资源www在线| 亚洲第一在线综合网站| 2023国产精华国产精品| 国产永久精品大片wwwapp| 中文字幕视频一区| 欧美一区2区视频在线观看| 粉嫩aⅴ一区二区三区四区 | 日韩午夜激情av| 国产高清不卡二三区| 亚洲最大成人综合| 国产农村妇女毛片精品久久麻豆 | 国产精品一卡二卡在线观看| 亚洲啪啪综合av一区二区三区| 欧美日韩国产天堂| 成人午夜av在线| 午夜久久福利影院| 中文字幕在线不卡视频| 精品国产网站在线观看| 精品视频一区三区九区| 成人做爰69片免费看网站| 日韩精品一级中文字幕精品视频免费观看| 国产午夜亚洲精品羞羞网站| 日韩精品在线一区二区| 欧美日韩精品综合在线| 99国产精品99久久久久久| 激情五月激情综合网| 婷婷丁香激情综合| 亚洲午夜一区二区三区| 亚洲视频小说图片| 中文字幕巨乱亚洲| 国产亚洲欧美激情| 久久久亚洲高清| 欧美白人最猛性xxxxx69交| 欧美精品99久久久**| 欧美唯美清纯偷拍| 欧美性受xxxx黑人xyx| 色婷婷久久综合| 91麻豆精品在线观看| 99久久国产综合精品女不卡 | 日韩国产精品久久久| 亚洲视频一二区| 亚洲免费观看视频| 依依成人综合视频| 亚洲国产精品自拍| 午夜精品久久久久久久| 亚洲成a人v欧美综合天堂下载| 亚洲人成网站精品片在线观看| 亚洲精品视频在线观看网站| 亚洲欧美日韩中文播放 | 色域天天综合网| av激情综合网| 日本高清无吗v一区| 欧美色中文字幕| 欧美高清激情brazzers| 欧美一区二区三区在线| 日韩美女在线视频| 国产午夜亚洲精品午夜鲁丝片| 国产精品乱码一区二三区小蝌蚪| 亚洲同性gay激情无套| 亚洲成人动漫在线免费观看| 日韩电影免费一区| 国产一区二区主播在线| 成人国产一区二区三区精品| 色婷婷精品久久二区二区蜜臀av| 91精品1区2区| 欧美一区二区三区性视频| 久久亚洲二区三区| 亚洲免费在线视频一区 二区| 亚洲一二三级电影| 韩国女主播成人在线| av在线不卡电影| 欧美老肥妇做.爰bbww视频| 日韩一区二区三区免费观看| 精品成人一区二区| 国产精品护士白丝一区av| 亚洲一区二区三区三| 黄网站免费久久| 欧美亚洲动漫另类| 欧美国产成人精品| 男女男精品视频| 国产69精品久久久久毛片 | 日韩欧美在线网站| 国产精品嫩草99a| 奇米综合一区二区三区精品视频| 国产91露脸合集magnet| 91精品国产综合久久精品麻豆| 久久久99久久精品欧美| 亚洲一区二区三区不卡国产欧美| 国产酒店精品激情| 亚洲男人的天堂在线aⅴ视频| 午夜av一区二区三区| 91网站黄www| 国产色91在线| 激情另类小说区图片区视频区| 91影院在线免费观看| 精品国产免费一区二区三区四区| 亚洲制服丝袜av| av一区二区三区四区| 国产无遮挡一区二区三区毛片日本| 亚洲综合男人的天堂| 99久久99精品久久久久久| 日韩免费观看高清完整版| 一区二区三区在线播| 99久久精品久久久久久清纯| 国产日韩精品一区二区三区 | 国产精品日韩精品欧美在线| 日韩精品色哟哟| 欧美日韩免费一区二区三区| 亚洲女人****多毛耸耸8| fc2成人免费人成在线观看播放 | 97se狠狠狠综合亚洲狠狠| 久久日一线二线三线suv| 免费成人在线影院| 日韩手机在线导航| 精一区二区三区| 精品国产91久久久久久久妲己| 亚洲成av人片一区二区梦乃| 欧美亚洲动漫精品| 婷婷国产在线综合| 日韩欧美色电影| 久久99精品久久久久久| 日韩精品电影一区亚洲| 91免费国产在线| 亚洲色图都市小说| 91蜜桃网址入口| 亚洲综合色视频| 欧美日韩亚洲国产综合| 亚洲图片欧美视频| 56国语精品自产拍在线观看| 美女免费视频一区二区| 久久综合九色综合久久久精品综合 | 日韩国产欧美三级| 欧美一激情一区二区三区| 日本伊人精品一区二区三区观看方式| 欧美高清www午色夜在线视频| 青青草97国产精品免费观看| 久久久国产精华| 成人国产精品免费观看| 一区二区三区四区蜜桃| 欧美肥妇bbw| 国产一区福利在线| 亚洲男人的天堂在线aⅴ视频| 欧美日韩第一区日日骚| 国产精品原创巨作av| 国产精品毛片高清在线完整版| 色噜噜狠狠成人中文综合| 欧美aa在线视频| 国产精品卡一卡二| 欧美日韩午夜精品| 国产精品18久久久久久vr | 成人免费一区二区三区视频 | 91成人在线精品| 日韩福利视频导航| 国产精品三级视频| 日韩女优制服丝袜电影| 99久久免费精品| 美腿丝袜亚洲三区| 亚洲人精品午夜| 精品久久一二三区| 在线免费不卡视频| 国产一区不卡在线| 午夜成人免费视频| 一区二区中文字幕在线| 欧美大片拔萝卜| 在线亚洲+欧美+日本专区| 国产一区二区福利视频| 天堂一区二区在线免费观看| 亚洲婷婷在线视频| 久久综合九色综合欧美亚洲| 在线视频你懂得一区| 91丝袜高跟美女视频| 岛国精品在线播放| 懂色中文一区二区在线播放| 久久99精品久久久| 视频一区中文字幕| 性久久久久久久久| 亚洲成人av一区二区| 亚洲欧美另类小说| 亚洲人成7777| 亚洲精品视频一区| 亚洲一区日韩精品中文字幕| 亚洲人123区| 亚洲精品国产精品乱码不99 | 午夜精品一区二区三区免费视频| 日韩毛片视频在线看| 国产精品人人做人人爽人人添| 久久久久久久电影| 2020国产精品| 国产亚洲一区二区三区| 久久久久久亚洲综合|