We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bd2029 commit ccb8d81Copy full SHA for ccb8d81
1 file changed
htdocs/themes/xbootstrap5/js/js.js
@@ -3,8 +3,8 @@
3
function initBootstrapCarousels(options) {
4
jQuery(function ($) {
5
$('.carousel').each(function () {
6
- if (window.bootstrap && window.bootstrap.Carousel) {
7
- window.bootstrap.Carousel.getOrCreateInstance(this, options);
+ if (globalThis.bootstrap?.Carousel) {
+ globalThis.bootstrap.Carousel.getOrCreateInstance(this, options);
8
} else if (typeof $.fn.carousel === 'function') {
9
$(this).carousel(options);
10
} else {
@@ -66,8 +66,8 @@ function initSlider() {
66
}
67
68
// Load when browser is idle
69
-if ('requestIdleCallback' in window) {
70
- requestIdleCallback(initSlider);
+if ('requestIdleCallback' in globalThis) {
+ globalThis.requestIdleCallback(initSlider);
71
72
setTimeout(initSlider, 200); // fallback
73
0 commit comments