I'm using the window.scrollTo function with behavior: 'smooth'. It indeed works well and smooth on Chrome, but on Safari it instantly scrolls instead of using the smooth animation. How can I fix that? Here is my code:
function scrollToInfo(infoDiv) {
let infoPos = $(infoDiv).offset().top;
window.scrollTo({
top: infoPos,
behavior: 'smooth'
});
}