diff options
| author | XhmikosR <[email protected]> | 2020-11-22 09:46:54 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2021-09-28 19:48:42 +0300 |
| commit | c2ebc32e0267d52276d7253d83766570e6f88649 (patch) | |
| tree | 8b3a4773ac4d27c6ac276eb9a577d2ad2c81584a | |
| parent | 9fc3b0a92f14f74df713bb32d9a8eb0b8ed6082f (diff) | |
| download | bootstrap-c2ebc32e0267d52276d7253d83766570e6f88649.tar.xz bootstrap-c2ebc32e0267d52276d7253d83766570e6f88649.zip | |
utils: cache element query
| -rw-r--r-- | js/src/util.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/util.js b/js/src/util.js index cd9d5e3b8..d544177d2 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -98,9 +98,11 @@ const Util = { return 0 } + const $element = $(element) + // Get transition-duration of the element - let transitionDuration = $(element).css('transition-duration') - let transitionDelay = $(element).css('transition-delay') + let transitionDuration = $element.css('transition-duration') + let transitionDelay = $element.css('transition-delay') const floatTransitionDuration = parseFloat(transitionDuration) const floatTransitionDelay = parseFloat(transitionDelay) |
