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

add a way to disable jQuery detection

This commit is contained in:
Johann-S
2019-08-02 15:51:05 +02:00
parent 1ebb8e7d9b
commit 8b2b490f9b
15 changed files with 92 additions and 27 deletions

View File

@@ -6,7 +6,7 @@
*/
import {
jQuery as $,
getjQuery,
getElementFromSelector,
isElement,
makeArray,
@@ -526,6 +526,8 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (
EventHandler
.on(document, Event.CLICK_DATA_API, Selector.FORM_CHILD, e => e.stopPropagation())
const $ = getjQuery()
/**
* ------------------------------------------------------------------------
* jQuery
@@ -533,7 +535,7 @@ EventHandler
* add .dropdown to jQuery only if jQuery is present
*/
/* istanbul ignore if */
if (typeof $ !== 'undefined') {
if ($) {
const JQUERY_NO_CONFLICT = $.fn[NAME]
$.fn[NAME] = Dropdown.jQueryInterface
$.fn[NAME].Constructor = Dropdown