1, top and left relative to the document jquery .offset()Get the current coordinates of the first element, or set the coordinates of every element, in the set of matched elements, relative to the document.var top = $('#elementID').offset().top; var left = $('#elementID').offset().left; native javascript getBoundingClientRect, top-left relative to the top-left of the viewport.var viewportOffset = ...