[woocommerce_my_account]
.pp-dots{ position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 5; } .pp-dot{ width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; } .pp-dot.active{ background: #fff; transform: scale(1.2); }
@media (max-width: 600px){ .pp-arrow{ width: 34px; height: 34px; font-size: 16px; } }
(function(){ let ppIndex = 0; let ppTimer = null; const INTERVAL = 4000; // ganti angka ini (ms) untuk mengubah kecepatan slide otomatis
function ppShow(i){ const slides = document.querySelectorAll('#ppSlideshow .pp-slide'); const dots = document.querySelectorAll('#ppSlideshow .pp-dot'); ppIndex = (i + slides.length) % slides.length; slides.forEach((s, idx) => s.classList.toggle('active', idx === ppIndex)); dots.forEach((d, idx) => d.classList.toggle('active', idx === ppIndex)); }
window.ppMove = function(step){ ppShow(ppIndex + step); ppResetTimer(); };
window.ppGoTo = function(i){ ppShow(i); ppResetTimer(); };
function ppAuto(){ ppShow(ppIndex + 1); }
function ppResetTimer(){ clearInterval(ppTimer); ppTimer = setInterval(ppAuto, INTERVAL); }
const container = document.getElementById('ppSlideshow'); container.addEventListener('mouseenter', () => clearInterval(ppTimer)); container.addEventListener('mouseleave', ppResetTimer);
ppResetTimer(); })();
[woocommerce_my_account]