I’d like to make the browser to scroll the page to a given anchor, just by using JavaScript.
I have specified a name or id attribute in my
name
id
function scrollTo(hash) { location.hash = "#" + hash; }
No jQuery required at all!