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/carousel/carousel.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js/src/carousel') diff --git a/js/src/carousel/carousel.js b/js/src/carousel/carousel.js index 0bac655ea..40984fe80 100644 --- a/js/src/carousel/carousel.js +++ b/js/src/carousel/carousel.js @@ -6,7 +6,7 @@ */ import { - jQuery as $, + getjQuery, TRANSITION_END, emulateTransitionEnd, getElementFromSelector, @@ -615,6 +615,8 @@ EventHandler.on(window, Event.LOAD_DATA_API, () => { } }) +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery @@ -622,7 +624,7 @@ EventHandler.on(window, Event.LOAD_DATA_API, () => { * add .carousel to jQuery only if jQuery is present */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Carousel.jQueryInterface $.fn[NAME].Constructor = Carousel -- cgit v1.2.3