Skip to content

Instantly share code, notes, and snippets.

@davglass
Created January 25, 2009 04:07
Show Gist options
  • Select an option

  • Save davglass/51679 to your computer and use it in GitHub Desktop.

Select an option

Save davglass/51679 to your computer and use it in GitHub Desktop.
function getPosition(el) {
if (document.documentElement.getBoundingClientRect) {
//They have getBoundingClientRect
var box = el.getBoundingClientRect();
if (isIE) {
//But we have to do something special for IE
}
} else {
//Other Browsers here..
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment