javascript - Set scroll position -
i'm trying set scroll position on page scroller scrolled way top.
i think need it's not working:
(function () { alert('hello'); document.body.scrolltop = 0; } ());
any ideas?
you can use window.scrollto()
, this:
window.scrollto(0, 0); // values x,y-offset
Comments
Post a Comment