I have this base code on my website's home page (myexample.com):
setTimeout(function(){
document.getElementById("pizza3").scrollIntoView( {behavior: 'smooth'} );
}, 2000);
Now as it stands, the scrolling effect will fire on every call to the home page (myexample.com). I actually want this script snippet to fire, AND ONLY FIRE, when the home page's url string explicitly reads: myexample.com#pizza3
How might the base code be modified to achieve?
Cheers!