2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

add a way to disable jQuery detection

This commit is contained in:
Johann-S
2019-08-02 15:51:05 +02:00
parent 1ebb8e7d9b
commit 8b2b490f9b
15 changed files with 92 additions and 27 deletions
+11 -2
View File
@@ -8,7 +8,6 @@
const MAX_UID = 1000000
const MILLISECONDS_MULTIPLIER = 1000
const TRANSITION_END = 'transitionend'
const { jQuery } = window
// Shoutout AngusCroll (https://goo.gl/pxwQGp)
const toType = obj => ({}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase())
@@ -176,8 +175,18 @@ const noop = () => function () {}
const reflow = element => element.offsetHeight
const getjQuery = () => {
const { jQuery } = window
if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
return jQuery
}
return null
}
export {
jQuery,
getjQuery,
TRANSITION_END,
getUID,
getSelectorFromElement,