1.0.2 • Published 5 months ago
carousel-vanilla-js v1.0.2
Vanilla JS Carousel
To insert a carousel use the following structure in your HTML file:
<div class="carousel-frame">
<div class="carousel">
<img src="./img1.jpg" />
<img src="./img2.jpg" />
<img class="active" src="./img4.jpg" />
<img src="./img2.jpg" />
</div>
</div>
On your javascript file call the function 'loadCarousels' which returns an array with all the carousels on your page.
const carousels = loadCarousels(document);