From 8b2b490f9b58a02494fe8567d6ce5b9c11a9bf65 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Fri, 2 Aug 2019 15:51:05 +0200 Subject: add a way to disable jQuery detection --- js/src/tab/tab.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js/src/tab') diff --git a/js/src/tab/tab.js b/js/src/tab/tab.js index 2d4b8e30c..b2374fe91 100644 --- a/js/src/tab/tab.js +++ b/js/src/tab/tab.js @@ -6,7 +6,7 @@ */ import { - jQuery as $, + getjQuery, TRANSITION_END, emulateTransitionEnd, getElementFromSelector, @@ -242,6 +242,8 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function ( data.show() }) +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery @@ -249,7 +251,7 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function ( * add .tab to jQuery only if jQuery is present */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Tab.jQueryInterface $.fn[NAME].Constructor = Tab -- cgit v1.2.3