1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-30 23:36:47 +02:00

upgrade to node 8.9.x and dist

This commit is contained in:
Mark Otto
2017-11-07 22:45:26 -06:00
parent 9deb1c677c
commit 9c213b7f27
13 changed files with 1053 additions and 103 deletions

12
js/dist/util.js vendored
View File

@@ -77,6 +77,13 @@ 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
@@ -99,6 +106,11 @@ var Util = function ($) {
if (!selector || selector === '#') {
selector = element.getAttribute('href') || '';
} // if it's an ID
if (selector.charAt(0) === '#') {
selector = escapeId(selector);
}
try {