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:
@@ -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
|
||||
|
Reference in New Issue
Block a user