Question: I'm trying to determine how many pixels down I've scrolled using `window.scrollY`. But this isn't supported in IE8. What is the safe, cross-browser alternative?

Answer: 
If you don't have to use it a lot, just do: 

```
var scroll = window.scrollY //Modern Way (Chrome, Firefox) 
|| document.documentElement.scrollTop (Old IE, 6,7,8)

```
Based on Niels' answer, I come up with a slightly more compact solution when just the Y coord is needed:

```
function get_scroll_y() {
    return window.pageYOffset || document.body.scrollTop || document.html.scrollTop;
}

```