Skip to content

24 ways to impress your friends

Vote down?

Mike Morici

Thanks Scott for going through this torturous experience for us and sharing your experience. The inconsistencies between browsers for something as simple as getting the scroll distance makes me want to pull my hair out.

I have two questions, and they might be simple to some but please chime in and enlighten me if you can thanks!

1] I’m confused on why setTimeout is needed on the window.load event.

2] If this script is inside the body tag why the need to check document.body?