From 035ef22e68be2bbf744a46925935e8fb89be15a6 Mon Sep 17 00:00:00 2001 From: Gage B <165205093+BulldogM@users.noreply.github.com> Date: Mon, 20 May 2024 08:12:30 -0500 Subject: [PATCH] ye --- index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index c5f823b..90992a0 100644 --- a/index.js +++ b/index.js @@ -141,14 +141,18 @@ function barSlide(elmnt, end) { let pos = 0; let inc = Math.round(end)/100; clearInterval(id); - id = setInterval(frame, 5); - function frame() { + if (end==0) { + elmnt.style.width = "0%"; + } else { + id = setInterval(frame, 5); + function frame() { if (Math.round(pos) == Math.round(end)) { clearInterval(id); } else { pos += inc; elmnt.style.width = pos + "%"; } + } } }