Skip to content

Commit

Permalink
changing image by dynamic dot button - fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
arparvezz committed Dec 10, 2023
1 parent 6659253 commit b1ececf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ function printDots(num) {
}
}
printDots(sliderImges.length);

// change image by clicking dots
dots.forEach((value, ind) => {

[...dotWrapper.children].forEach((value, ind) => {
value.addEventListener("click", function (event) {
changeImg(ind);
activeDots(ind);
});
});

Expand Down

0 comments on commit b1ececf

Please sign in to comment.