mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-25 21:09:06 +02:00
dist
This commit is contained in:
14
js/dist/util.js
vendored
14
js/dist/util.js
vendored
@@ -14,7 +14,7 @@ var Util = function ($) {
|
||||
var MAX_UID = 1000000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
function toType(obj) {
|
||||
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
}
|
||||
|
||||
function getSpecialTransitionEndEvent() {
|
||||
@@ -64,13 +64,6 @@ var Util = function ($) {
|
||||
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
||||
}
|
||||
}
|
||||
|
||||
function escapeId(selector) {
|
||||
// We escape IDs in case of special selectors (selector = '#myId:something')
|
||||
// $.escapeSelector does not exist in jQuery < 3
|
||||
selector = typeof $.escapeSelector === 'function' ? $.escapeSelector(selector).substr(1) : selector.replace(/(:|\.|\[|\]|,|=|@)/g, '\\$1');
|
||||
return selector;
|
||||
}
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Public Util Api
|
||||
@@ -93,11 +86,6 @@ var Util = function ($) {
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
selector = element.getAttribute('href') || '';
|
||||
} // If it's an ID
|
||||
|
||||
|
||||
if (selector.charAt(0) === '#') {
|
||||
selector = escapeId(selector);
|
||||
}
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user