I would like to scroll up to the top smoothly with pure JS, with code not much longer than the current one. Now, it just scrolls up 1px (I think it's px)
Code snippet:
var textdiv = document.getElementById('infoblok');
var currentscroll = textdiv.scrollTop;
for(i = currentscroll; i>0; i--){
textdiv.scrollTop = currentscroll-1;
}