Skip to content

Instantly share code, notes, and snippets.

@MaxPower15
Created July 11, 2012 21:59
Show Gist options
  • Save MaxPower15/3093919 to your computer and use it in GitHub Desktop.
Save MaxPower15/3093919 to your computer and use it in GitHub Desktop.
Abuse of ternary operators in coffeescript
result = Wistia.detect.browser.quirks ? parseInt(elem.offsetHeight, 10) : window.getComputedStyle && getComputedStyle(elem, null) ? parseInt(getComputedStyle(elem, null).height, 10) : elem.currentStyle ? elem.offsetHeight : -1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment