0

When I call .hide on a div and then .show on another div to replace the last one, the page scrolls to the top. These calls are triggered by a timer. Any idea how to prevent the page from scrolling to the top?

Matt Vaughan
  • 1,135
  • 2
  • 13
  • 19
  • It would greatly help if you showed your code. Hiding and showing elements won't scroll the page unless they change the size of the page – MrOBrian Jul 20 '12 at 16:21
  • Use .scrollTop(). More info [here][1]. [1]: http://stackoverflow.com/questions/2009029/restoring-page-scroll-position-with-jquery – darth10 Jul 20 '12 at 16:21

0 Answers0