javascript scroll
Ako želimo da se prilikom učitavanja stranice, stranica automatski scroll-a do određenog elementa koristimo document.getElementById('div1').scrollIntoView
gdje je div1 id elementa. Kada dodamo behavior: 'smooth' dobivao smooth scroll, ukoliko ovo izostavimo stranica će samo skočiti na određeni element bez animacije
document.getElementById('div1').scrollIntoView({
behavior: 'smooth'
});
za scroll do određene pozicije koristimo window.scrollTo(x, y)
gdje su x i y koridnate u pixelima
window.scrollTo(x, y)