Возникла проблема, что после добавления переменных код ниже переменных, а именно обозначение класса
.top-owl-carousel перестал работать, и вместе с ним не работают переменные и рандомизация этих переменных? Что в коде не правильно? Все файлы подключил (Jquery, Owl-Carousel и сам файл, в котором пишется код)
$(document).ready(function(){
var square = ("background: linear-gradient(currentColor, currentColor) 50% / 50% 50% no-repeat");
var rhombus = ("background: linear-gradient(100deg, transparent 30%, currentColor 30%, currentColor 70%, transparent 70%) 50% / 90% 40% no-repeat");
var circle = ("background: radial-gradient(currentColor 50%, transparent 50%) 50% / 75% 75% no-repeat");
var semicircle = ("background: radial-gradient(circle at 50% 0%, currentColor 40%, transparent 40%) 50% 100% / 60% 60% no-repeat");
var ellipse = ("background: radial-gradient(currentColor 50%, transparent 50%) 50% / 75% 45% no-repeat");
var hollowCircle = ("background: radial-gradient(transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px)) 50% / 75% 75% no-repeat");
var stick = ("background: linear-gradient(90deg, currentColor, currentColor) 50% / 2px 75% no-repeat");
var triangle = ("background: conic-gradient(from 145deg, currentColor 0, currentColor 20%, transparent 20%) 50% -50% / 80% 80% no-repeat");
var quadrilateral = ("background: conic-gradient(from 165deg at 50% -86%, currentColor 0, currentColor 8%, transparent 8%) 50% / 50% 50% no-repeat");
var bookmark = ("background: conic-gradient(from -45deg, currentColor 25%, currentColor 50%, transparent 50%, transparent 75%, currentColor 75%) 50% 120% / 30% 80% no-repeat");
var pentagon = ("background: conic-gradient(from 90deg at 0 0, transparent 25deg, currentColor 25deg, currentColor 65deg, transparent 65deg) 50% / 50% 50% no-repeat");
var hourglass = ("background: conic-gradient(from 90deg, transparent 12.5%, currentColor 12.5%, currentColor 37.5%, transparent 37.5%, transparent 62.5%, currentColor 62.5%, currentColor 87.5%, transparent 87.5%) 50% / 32% 50% no-repeat");
var figures = [square, rhombus, circle, semicircle, ellipse, hollowCircle, stick, triangle, quadrilateral, bookmark, pentagon, hourglass];
var positionStart1 = ("top: 0");
var positionStart2 = ("top: 100");
var positionStart3 = ("top: 200");
var positionStart4 = ("top: 300");
var positionStart5 = ("top: 400");
var particlesMax = 30;
var animationParticle = ("animation: particle1 5s infinite ease-in-out");
var randFigure = min + Math.floor(Math.random() * (max + 1 - min));
$("#top-owl-carousel").owlCarousel({
items: 1,
smartSpeed: 1000,
loop: true,
mouseDrag: true,
touchDrag: true,
nav: true,
dots: true,
autoplay: true,
autoplayTimeout: 100000,
autoplayHoverPause: true,
});
$("#production-formats-owl").owlCarousel({
responsive:{
0:{
items: 1
},
600:{
items: 2
},
1000:{
items: 3
}
},
margin: 20,
merge: true,
smartSpeed: 1000,
loop: false,
mouseDrag: true,
touchDrag: true,
nav: true,
dots: true,
autoplay: false
});
$("#placement-examples-owl").owlCarousel({
responsive:{
0:{
items: 1
},
600:{
items: 1
},
1000:{
items: 2
}
},
margin: 10,
merge: true,
smartSpeed: 1000,
loop: false,
mouseDrag: false,
touchDrag: true,
nav: true,
dots: true,
autoplay: false
});
});