diff options
Diffstat (limited to 'js/dist/util.js')
-rw-r--r-- | js/dist/util.js | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/js/dist/util.js b/js/dist/util.js index 778145500f..0b4963174f 100644 --- a/js/dist/util.js +++ b/js/dist/util.js @@ -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 { |