Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[DOCS] Resolved an error with Splider (#26795)

Andrzej Kopytkoaece8c61c99a
diff --git a/docs/sphinx_setup/_static/js/custom.js b/docs/sphinx_setup/_static/js/custom.js
index 5ee1260c8f4..455f9dc6ae5 100644
--- a/docs/sphinx_setup/_static/js/custom.js
+++ b/docs/sphinx_setup/_static/js/custom.js
@@ -353,18 +353,21 @@ function addFooter() {
}
function initSplide() {
- var splide = new Splide('.splide', {
- type: 'fade',
- autoHeight: true,
- perPage: 1,
- autoplay: true,
- arrows: false,
- waitForTransition: true,
- wheel: true,
- wheelSleep: 250,
- interval: 3000,
- });
- splide.mount();
+ var splider = document.getElementsByClassName('.splide');
+ if(splider.length != 0){
+ var splide = new Splide('.splide', {
+ type: 'fade',
+ autoHeight: true,
+ perPage: 1,
+ autoplay: true,
+ arrows: false,
+ waitForTransition: true,
+ wheel: true,
+ wheelSleep: 250,
+ interval: 3000,
+ });
+ splide.mount();
+ }
}
// ---------- COVEO SEARCH -----------