<!-- Add more card elements here -->
</div>
<script>
// Infinite slider logic
const slider = document.querySelector('.slider');
const cards = document.querySelectorAll('.card');
const cardWidth = cards[0].offsetWidth;
const previousButton = document.createElement('button');
const nextButton = document.createElement('button');
previousButton.innerHTML = '<'; // Previous icon
nextButton.innerHTML = '>'; // Next icon
previousButton.addEventListener('click', () => {
slider.scrollBy(-cardWidth, 0);
});
nextButton.addEventListener('click', () => {
slider.scrollBy(cardWidth, 0);
});
slider.appendChild(previousButton);
slider.appendChild(nextButton);
</script>