$(".gp-more-goods .gcarousel .goods-list").each(function() {
var carousel = $(this),
prev = $(this).parent().parent().parent().find('.gcarouselarrow.prev'),
next = $(this).parent().parent().parent().find('.gcarouselarrow.next');
$(this).owlCarousel({
loop: true,
autoplay: true,
autoplayTimeout: 3000,
autoplayHoverPause: true,
items: 4,
itemsDesktop: [1647, 4],
itemsDesktopSmall: [1268, 4],
itemsTablet: [991, 3],
itemsTabletSmall: [780, 2],
itemsMobile: [567, 2]
});
prev.click(function() {
carousel.trigger('owl.prev');
});
next.click(function() {
carousel.trigger('owl.next');
});
});
});
let btn = document.querySelector('.config-button');
btn.addEventListener('click', () => {
let conf = document.querySelectorAll('li.active');
conf.forEach((elem) => {
console.log(elem.textContent);
});
});
});
$(".config-button").click(() => {
let conf = $("li.active").text();
console.log(conf);
});
let payInstallmentsToggle = document.querySelector('.payment-item__pay-installments--toggle')
let payInstallments = document.querySelector('.payment-item__pay-installments__info')
let isClose = document.querySelector('.payment-item__pay-installments--close');
payInstallmentsToggle.addEventListener("click", () => {
payInstallmentsToggle.classList.add('w--open');
payInstallments.classList.add('w--open');
});
isClose.addEventListener("click", () => {
payInstallmentsToggle.classList.remove('w--open');
payInstallments.classList.remove('w--open');
});