1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 21:09:06 +02:00

Merge branch 'v4-dev' of https://github.com/twbs/bootstrap into v4-dev

This commit is contained in:
Mark Otto
2016-06-12 21:17:14 -07:00
61 changed files with 828 additions and 8483 deletions

7
js/dist/util.js vendored
View File

@@ -17,6 +17,8 @@ var Util = (function ($) {
var transition = false;
var MAX_UID = 1000000;
var TransitionEndEvent = {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
@@ -39,8 +41,9 @@ var Util = (function ($) {
delegateType: transition.end,
handle: function handle(event) {
if ($(event.target).is(this)) {
return event.handleObj.handler.apply(this, arguments);
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
return undefined;
}
};
}
@@ -102,7 +105,7 @@ var Util = (function ($) {
getUID: function getUID(prefix) {
do {
/* eslint-disable no-bitwise */
prefix += ~ ~(Math.random() * 1000000); // "~~" acts like a faster Math.floor() here
prefix += ~ ~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
/* eslint-enable no-bitwise */
} while (document.getElementById(prefix));
return prefix;