Reset the scroll position on the page  [ 719 views ]

Goal: reset the scroll position

If the page content is dinamically loaded sometimes we need to reset the scroll position of the page. Like this:

  window.scrollTo(0, 0); 
  ...  or just without the window object ...
  scrollTo(0, 0); 
#sidebar a { color:#fff; } #sidebar ul ul li { color: #DEF585; } #sidebar h2 { color: #fff; } #sidebar ul p, #sidebar ul select { color: #BEDDBE; } #backfly { background: url(images/golfBallWallPaper.jpg) left bottom fixed repeat-x #65a51d; }