Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
Updated it not to mention the images directory
  • Loading branch information
SameerAhmed419 authored Aug 9, 2024
1 parent fb3c675 commit ebfc794
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ let currentImageNumber = 1;
function imageAhead() {
switch(currentImageNumber) {
case 1:
imageElement.src = `/images/${imageSources[1]}`;
imageElement.src = `/${imageSources[1]}`;
currentImageNumber = 2;
break;
case 2:
imageElement.src = `/images/${imageSources[2]}`;
imageElement.src = `/${imageSources[2]}`;
currentImageNumber = 3;
break;
case 3:
imageElement.src = `/images/${imageSources[0]}`;
imageElement.src = `/${imageSources[0]}`;
currentImageNumber = 1;
break;
default:
Expand All @@ -22,15 +22,15 @@ function imageAhead() {
function imageBehind() {
switch(currentImageNumber) {
case 1:
imageElement.src = `/images/${imageSources[2]}`;
imageElement.src = `/${imageSources[2]}`;
currentImageNumber = 3;
break;
case 2:
imageElement.src = `/images/${imageSources[0]}`;
imageElement.src = `/${imageSources[0]}`;
currentImageNumber = 1;
break;
case 3:
imageElement.src = `/images/${imageSources[1]}`;
imageElement.src = `/${imageSources[1]}`;
currentImageNumber = 2;
break;
default:
Expand Down

0 comments on commit ebfc794

Please sign in to comment.