title: Using jquery to get element's position relative to viewport
body: <p>What's the proper way to get the position of an element on the page relative to the viewport (rather than the document). <a href="http://api.jquery.com/offset/" rel="noreferrer"><code>jQuery.offset</code></a> function seemed promising:</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>But that's relative to the document. Is there an equivalent method that returns offsets relative to the viewport?</p>