I implemented the setTimeOut function to achieve smooth scrolling.
However,
Unfortunately, my function is not behaving as expected.
While it is functioning, the scrolling is not smooth enough.
I would greatly appreciate any assistance!
const handleScroll = () => {
const pageCards_div = document.getElementsByClassName('page-cards')
for (let i = 0; i < 235; i++) {
setTimeout(() => {
pageCards_div[0].scrollLeft += 1
}, 1000)
}
}