diff options
Diffstat (limited to 'js/dist/tooltip.js')
-rw-r--r-- | js/dist/tooltip.js | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/js/dist/tooltip.js b/js/dist/tooltip.js index 170367aa20..c895818e64 100644 --- a/js/dist/tooltip.js +++ b/js/dist/tooltip.js @@ -1,5 +1,5 @@ /*! - * Bootstrap tooltip.js v5.0.0-alpha2 (https://getbootstrap.com/) + * Bootstrap tooltip.js v5.0.0-alpha3 (https://getbootstrap.com/) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ @@ -19,7 +19,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-alpha2): util/index.js + * Bootstrap (v5.0.0-alpha3): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -148,9 +148,17 @@ return null; }; + var onDOMContentLoaded = function onDOMContentLoaded(callback) { + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', callback); + } else { + callback(); + } + }; + /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-alpha2): util/sanitizer.js + * Bootstrap (v5.0.0-alpha3): util/sanitizer.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -287,7 +295,7 @@ */ var NAME = 'tooltip'; - var VERSION = '5.0.0-alpha2'; + var VERSION = '5.0.0-alpha3'; var DATA_KEY = 'bs.tooltip'; var EVENT_KEY = "." + DATA_KEY; var CLASS_PREFIX = 'bs-tooltip'; @@ -1011,27 +1019,29 @@ return Tooltip; }(); - - var $ = getjQuery(); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ - * add .tooltip to jQuery only if jQuery is present + * add .Tooltip to jQuery only if jQuery is present */ - /* istanbul ignore if */ - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Tooltip.jQueryInterface; - $.fn[NAME].Constructor = Tooltip; + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Tooltip.jQueryInterface; - }; - } + if ($) { + var JQUERY_NO_CONFLICT = $.fn[NAME]; + $.fn[NAME] = Tooltip.jQueryInterface; + $.fn[NAME].Constructor = Tooltip; + + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Tooltip.jQueryInterface; + }; + } + }); return Tooltip; |