1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-17 19:06:40 +02:00
This commit is contained in:
XhmikosR
2019-08-27 16:03:21 +03:00
committed by GitHub
parent cad3d1098a
commit bf57274fb5
59 changed files with 1686 additions and 2107 deletions

View File

@@ -15,8 +15,17 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var _window = window,
jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var getjQuery = function getjQuery() {
var _window = window,
jQuery = _window.jQuery;
if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
return jQuery;
}
return null;
};
/**
* --------------------------------------------------------------------------
@@ -30,6 +39,7 @@
* ------------------------------------------------------------------------
*/
var $ = getjQuery();
var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
var stripNameRegex = /\..*/;
var keyEventRegex = /^key/;
@@ -257,9 +267,9 @@
var defaultPrevented = false;
var evt = null;
if (inNamespace && typeof jQuery !== 'undefined') {
jQueryEvent = jQuery.Event(event, args);
jQuery(element).trigger(jQueryEvent);
if (inNamespace && $) {
jQueryEvent = $.Event(event, args);
$(element).trigger(jQueryEvent);
bubbles = !jQueryEvent.isPropagationStopped();
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
defaultPrevented = jQueryEvent.isDefaultPrevented();