mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-15 10:05:40 +02:00
Dist (#29263)
This commit is contained in:
36
js/dist/toast.js
vendored
36
js/dist/toast.js
vendored
@@ -85,9 +85,7 @@
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
var MILLISECONDS_MULTIPLIER = 1000;
|
||||
var TRANSITION_END = 'transitionend';
|
||||
var _window = window,
|
||||
jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
var toType = function toType(obj) {
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
@@ -160,6 +158,17 @@
|
||||
return element.offsetHeight;
|
||||
};
|
||||
|
||||
var getjQuery = function getjQuery() {
|
||||
var _window = window,
|
||||
jQuery = _window.jQuery;
|
||||
|
||||
if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
|
||||
return jQuery;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
@@ -322,7 +331,7 @@
|
||||
} // Static
|
||||
;
|
||||
|
||||
Toast._jQueryInterface = function _jQueryInterface(config) {
|
||||
Toast.jQueryInterface = function jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = Data.getData(this, DATA_KEY);
|
||||
|
||||
@@ -342,7 +351,7 @@
|
||||
});
|
||||
};
|
||||
|
||||
Toast._getInstance = function _getInstance(element) {
|
||||
Toast.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
@@ -365,6 +374,8 @@
|
||||
|
||||
return Toast;
|
||||
}();
|
||||
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
@@ -374,15 +385,14 @@
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
if ($) {
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
$.fn[NAME] = Toast.jQueryInterface;
|
||||
$.fn[NAME].Constructor = Toast;
|
||||
|
||||
if (typeof jQuery !== 'undefined') {
|
||||
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||
jQuery.fn[NAME] = Toast._jQueryInterface;
|
||||
jQuery.fn[NAME].Constructor = Toast;
|
||||
|
||||
jQuery.fn[NAME].noConflict = function () {
|
||||
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Toast._jQueryInterface;
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Toast.jQueryInterface;
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user