Get an element’s position with Javascript

Last month I posted how to get an element’s position relative to the document with jQuery and in this post show how to do the same thing but with native Javascript without the use of a 3rd party library.