Currently I'm using the scrollTo method to jump to an element on my page, but I'm trying to get it to smooth scroll.
I looked at scrollIntoView because they have options like this:
Code
elmnt.scrollIntoView({ behavior: 'smooth', block: 'end'});
I was wondering if scrollTo allowed the same options
This is my current code:
Code
document.querySelector(".cards").onclick = function() {
const x = 0;
const y = 550;
window.scrollTo(x, y);
Since I'm using exact cords for the jump, can the same be done with scrollIntoView
I also saw that both options aren't supported on Safari, safari IOS and edge tho. Is there another way to achieve this without a library