Getting and setting scroll position
I relied on jQuery to handle getting and setting scroll position in BeerCamp 2011, but after taking another look, its pretty easy to do with modern browsers.
// get scroll position var y = window.scrollX, x = window.scrollY; // set scroll position to x: 140, y: 700 window.scrollTo( 140, 700 );You might see
pageXOffsetandpageYOffset, as these properties are the same asscrollXandscrollY. Old IE doesn’t support either.