1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-27 13:59:06 +02:00

remove old references to jquery and some fixes

This commit is contained in:
Johann-S
2018-03-11 16:18:56 +01:00
committed by XhmikosR
parent 0263d1742c
commit 7eddee286e
14 changed files with 44 additions and 56 deletions

View File

@@ -114,8 +114,11 @@ class Alert {
}
_destroyElement(element) {
if (element.parentNode) {
element.parentNode.removeChild(element)
}
EventHandler.trigger(element, Event.CLOSED)
element.parentNode.removeChild(element)
}
// Static
@@ -150,8 +153,8 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleD
* add .alert to jQuery only if jQuery is present
*/
if (typeof window.$ !== 'undefined' || typeof window.jQuery !== 'undefined') {
const $ = window.$ || window.jQuery
const $ = Util.jQuery
if (typeof $ !== 'undefined') {
const JQUERY_NO_CONFLICT = $.fn[NAME]
$.fn[NAME] = Alert._jQueryInterface
$.fn[NAME].Constructor = Alert