Today I have found out that Internet Explorer 9 might fire document ready JavaScript event before document is actually ready. It took me a few swearwords to figure it out. I experienced this issue using Internet Explorer 9 and jQuery 1.8.0.
The solution is simple – in case you are using inline scripts, just put them at the bottom of your page. That’s it.