Skip to content

Commit

Permalink
add solution
Browse files Browse the repository at this point in the history
  • Loading branch information
hardaira committed Aug 27, 2024
1 parent 293e9e2 commit a395210
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ <h1>Strategic Agency</h1>

<!-- Next and previous buttons -->
<a
id="prev-img"
class="prev"
onclick="plusSlides(-1)"
>
Expand Down
14 changes: 11 additions & 3 deletions src/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@

}

document.getElementById("next-img").addEventListener("click", function () {
document.addEventListener("DOMContentLoaded", function () {
showSlides(slideIndex);
/* setInterval(function () {
plusSlides(1);
}, 2000); */
}
);

document.getElementById("prev-img").addEventListener("click", function () {
showSlides(-1);
});

document.getElementById("next-img").addEventListener("click", function () {
showSlides(1);
});

});

0 comments on commit a395210

Please sign in to comment.