JavaScript to scroll long page to DIV

old question, but if anyone finds this through google (as I did) and who does not want to use anchors or jquery; there’s a builtin javascriptfunction to ‘jump’ to an element;

document.getElementById('youridhere').scrollIntoView();

and what’s even better; according to the great compatibility-tables on quirksmode, this is supported by all major browsers!

Leave a Comment