mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
fix declaration of alert jquery plugin only if jquery is available
This commit is contained in:
parent
4aef395e49
commit
3664d14908
@ -21,7 +21,6 @@ const VERSION = '4.3.1'
|
||||
const DATA_KEY = 'bs.alert'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Selector = {
|
||||
DISMISS : '[data-dismiss="alert"]'
|
||||
@ -153,6 +152,7 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleD
|
||||
|
||||
if (typeof window.$ !== 'undefined' || typeof window.jQuery !== 'undefined') {
|
||||
const $ = window.$ || window.jQuery
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
$.fn[NAME] = Alert._jQueryInterface
|
||||
$.fn[NAME].Constructor = Alert
|
||||
$.fn[NAME].noConflict = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user