精品久久久久久亚洲精品_成人午夜网站_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;">

          一区二区三区欧美视频| 日韩欧美综合在线| 国产激情视频一区二区三区欧美| 性感美女久久精品| 亚洲精品成人a在线观看| 国产精品福利影院| 日韩午夜激情视频| 国产精品久久夜| 精品欧美久久久| 欧美一区三区二区| 91精品国产综合久久福利| 欧美专区日韩专区| 欧美性受xxxx| 欧美日韩1区2区| 欧美在线观看一区| 欧美制服丝袜第一页| 欧美日韩美少妇| 制服丝袜亚洲网站| 久久你懂得1024| 亚洲欧洲一区二区在线播放| 亚洲美女视频一区| 午夜精品影院在线观看| 狠狠色丁香久久婷婷综合丁香| 精品一区二区三区蜜桃| 成人禁用看黄a在线| 91啪亚洲精品| 日韩三级在线观看| 国产清纯白嫩初高生在线观看91 | 2023国产一二三区日本精品2022| 精品日韩一区二区三区免费视频| 久久九九国产精品| 亚洲主播在线播放| 久久精品国产一区二区三 | 亚洲第一av色| 国产一区二区久久| 欧美亚洲免费在线一区| 日韩欧美一级特黄在线播放| 欧美激情综合网| 婷婷综合另类小说色区| 国产一区二区三区精品视频| 色噜噜狠狠色综合欧洲selulu| 欧美一区二区免费视频| 国产精品成人免费精品自在线观看 | 成人黄色av网站在线| 欧美日韩精品一区视频| 国产欧美一区二区三区沐欲| 亚洲国产人成综合网站| 国产成人av电影在线| 欧美人狂配大交3d怪物一区| 中文字幕乱码久久午夜不卡 | 亚洲综合激情网| 丁香六月久久综合狠狠色| 欧美日韩亚洲综合| 亚洲欧洲精品天堂一级| 卡一卡二国产精品| 欧美另类z0zxhd电影| 中文一区二区完整视频在线观看| 日韩精品1区2区3区| 99国产麻豆精品| 日本一区二区视频在线观看| 欧美bbbbb| 欧美精品18+| 亚洲成人动漫av| 欧美视频日韩视频在线观看| 中文字幕制服丝袜成人av | 一区二区三区欧美视频| 成人午夜av在线| 亚洲国产电影在线观看| 懂色av噜噜一区二区三区av| 91精品国产色综合久久| 亚洲中国最大av网站| 色婷婷av一区二区三区gif| 国产精品久久久久久久久动漫 | 日韩av中文字幕一区二区| 欧美在线视频你懂得| 亚洲乱码精品一二三四区日韩在线| 国产高清不卡一区二区| 久久久精品2019中文字幕之3| 日韩av午夜在线观看| 欧美美女视频在线观看| 亚洲制服丝袜av| 日本高清不卡在线观看| 亚洲综合久久久| 欧美日韩国产在线播放网站| 亚洲综合一区二区| 欧美日韩一区二区三区四区五区| 亚洲男同性视频| 91国偷自产一区二区三区成为亚洲经典 | 91精品办公室少妇高潮对白| 亚洲综合免费观看高清完整版在线 | jizz一区二区| 亚洲蜜臀av乱码久久精品蜜桃| 色94色欧美sute亚洲13| 天天综合网 天天综合色| 欧美一级国产精品| 国产综合久久久久影院| 国产精品美女久久久久久久| 在线观看91视频| 麻豆视频观看网址久久| 久久综合精品国产一区二区三区| 韩国av一区二区三区在线观看| 久久久夜色精品亚洲| 99精品偷自拍| 午夜视频一区二区三区| 亚洲精品在线免费播放| 99re6这里只有精品视频在线观看| 一级做a爱片久久| 欧美成人一区二区| av亚洲精华国产精华精华| 亚洲成人资源在线| 国产亚洲午夜高清国产拍精品 | 精品久久久久av影院| 91丝袜高跟美女视频| 日韩av一区二区在线影视| 国产欧美日韩另类视频免费观看| 91蜜桃在线免费视频| 裸体一区二区三区| 亚洲美女视频在线观看| 久久久青草青青国产亚洲免观| 色综合一个色综合| 极品少妇xxxx偷拍精品少妇| 亚洲自拍另类综合| 久久精品一区二区三区不卡 | 国产精品久久久久aaaa樱花| 欧美一区二区视频在线观看2022| www.亚洲人| 国产乱子伦视频一区二区三区| 亚洲日本丝袜连裤袜办公室| 久久丝袜美腿综合| 91精品国产全国免费观看| 日本乱人伦一区| 99免费精品在线| 粉嫩aⅴ一区二区三区四区五区| 亚洲成a人片在线不卡一二三区 | 国产日产欧美一区二区视频| 欧美精品一卡两卡| 欧美午夜一区二区三区免费大片| 国产精品一区二区三区四区| 蜜桃久久av一区| 亚洲成人动漫av| 亚洲精品免费电影| 亚洲精品精品亚洲| 国产精品久久久久桃色tv| 久久日一线二线三线suv| 欧美不卡一区二区三区四区| 欧美三级在线播放| 精品视频1区2区| 91成人国产精品| 色成年激情久久综合| 99国产精品99久久久久久| 成人午夜电影小说| 成人黄色软件下载| 不卡免费追剧大全电视剧网站| 国产麻豆视频一区| 国产99久久久久| 成人精品gif动图一区| kk眼镜猥琐国模调教系列一区二区| 国内精品国产成人国产三级粉色| 国内欧美视频一区二区 | 色综合天天综合网天天看片| 大胆欧美人体老妇| av一二三不卡影片| 欧美亚洲愉拍一区二区| 欧美日韩国产精选| 欧美成人精品二区三区99精品| 久久一日本道色综合| 久久久久久97三级| 国产精品国产三级国产普通话三级| 国产精品久久久久久久久免费丝袜| 中文字幕亚洲一区二区va在线| 亚洲女与黑人做爰| 亚洲va韩国va欧美va| 国产综合色在线| 色久综合一二码| 精品蜜桃在线看| 中文字幕人成不卡一区| 亚洲v日本v欧美v久久精品| 看片网站欧美日韩| av电影天堂一区二区在线| 欧美日韩中字一区| 久久久精品免费观看| 一区二区三区精品久久久| 蜜桃久久精品一区二区| 99久久99久久精品免费看蜜桃| 欧美中文字幕一二三区视频| 欧美r级电影在线观看| 国产精品美女久久久久久久网站| 亚洲国产sm捆绑调教视频 | 男男视频亚洲欧美| av电影在线不卡| 欧美大黄免费观看| 亚洲少妇30p| 精品在线一区二区| 欧美日韩精品免费| 国产精品视频九色porn| 免费在线成人网| 欧美在线观看你懂的| 国产精品不卡在线| 精品在线免费视频| 777精品伊人久久久久大香线蕉|