diff options
| author | Johann-S <[email protected]> | 2019-08-02 15:51:05 +0200 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2019-08-02 16:50:05 +0200 |
| commit | 8b2b490f9b58a02494fe8567d6ce5b9c11a9bf65 (patch) | |
| tree | fca5d7d55bb5f2932eda48f4594b4a839b0a8987 /js/src/button/button.js | |
| parent | 1ebb8e7d9b4bd52c7fc088aeaec12ab9bcb240c6 (diff) | |
| download | bootstrap-8b2b490f9b58a02494fe8567d6ce5b9c11a9bf65.tar.xz bootstrap-8b2b490f9b58a02494fe8567d6ce5b9c11a9bf65.zip | |
add a way to disable jQuery detection
Diffstat (limited to 'js/src/button/button.js')
| -rw-r--r-- | js/src/button/button.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/button/button.js b/js/src/button/button.js index b7e20461d..d64f5130e 100644 --- a/js/src/button/button.js +++ b/js/src/button/button.js @@ -5,7 +5,7 @@ * -------------------------------------------------------------------------- */ -import { jQuery as $ } from '../util/index' +import { getjQuery } from '../util/index' import Data from '../dom/data' import EventHandler from '../dom/event-handler' import SelectorEngine from '../dom/selector-engine' @@ -179,6 +179,8 @@ EventHandler.on(document, Event.BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, even } }) +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery @@ -186,7 +188,7 @@ EventHandler.on(document, Event.BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, even * add .button to jQuery only if jQuery is present */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Button.jQueryInterface $.fn[NAME].Constructor = Button |
