Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • The approach works beautifully and could be the accepted answer, because it is much shorter than any other solution (apart from using jQuery). Commented May 8, 2015 at 23:07
  • 2
    Won't it throw an error if document.documentElement is undefined?
    – PhiLho
    Commented Sep 14, 2015 at 17:59
  • This really needs more articulation on what you suggest and why.
    – JGallardo
    Commented Sep 27, 2023 at 19:00