Here is my JS:
document.querySelector('input[type=range]').addEventListener('input', function(event) {
console.log(event.target.value);
console.log(window.location);
document.querySelector('#day0' + event.target.value).scrollIntoView({
behavior: 'smooth'
});
});
<input type="range" min="0" max="100" value="7" step="1">
There are 100 items (labelled in #day000 format from #day001 to #day100). The slider will skip the first ten days when I slide to the right and when I slide all the way back to the left it will stop at day #009 or #010.
I'd like it to scroll all the way to the beginning. Any ideas?