Skip to content

Instantly share code, notes, and snippets.

@kellegous
Created January 23, 2013 11:52
Show Gist options
  • Save kellegous/4604735 to your computer and use it in GitHub Desktop.
Save kellegous/4604735 to your computer and use it in GitHub Desktop.
elementA.className = "a-style";
elementB.className = "b-style";
var heightA = elementA.offsetHeight; // layout is needed and calculated
var heightB = elementB.offsetHeight; // layout is up-to-date (no work)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment