diff options
Diffstat (limited to 'js/src/dropdown')
| -rw-r--r-- | js/src/dropdown/dropdown.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/dropdown/dropdown.js b/js/src/dropdown/dropdown.js index 7f5264d05..2c30ba740 100644 --- a/js/src/dropdown/dropdown.js +++ b/js/src/dropdown/dropdown.js @@ -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 |
