From: Max Value Date: Mon, 23 Mar 2026 22:02:10 +0000 (+0000) Subject: Fixed number string comparison bug X-Git-Url: https://git.ozva.co.uk/?a=commitdiff_plain;h=a56a335507f6337327c258703ff987ea7c3206f7;p=chester Fixed number string comparison bug --- diff --git a/slideshow.js b/slideshow.js index 6aa88bf..4a0d288 100644 --- a/slideshow.js +++ b/slideshow.js @@ -67,8 +67,9 @@ function setupSlideshow () { document.getElementById(`show${si}slide${e.target.parentNode.dataset.slideCurrent}`) .style.display = "none"; + e.target.parentNode.dataset.slideCurrent ++; - if (e.target.parentNode.dataset.slideCurrent >= slideCount) { + if (Number(e.target.parentNode.dataset.slideCurrent) >= Number(slideCount)) { e.target.parentNode.dataset.slideCurrent = 0; } document.getElementById(`show${si}slide${e.target.parentNode.dataset.slideCurrent}`)