How can I get these jQuery results with vanilla JavaScript?
<p>Does anybody know how I can get the equivalent of jQuery's <code>.offset()</code> and <code>.closest()</code> without a JavaScript library?</p>

<p>For <code>.closest()</code>, if I know how far to climb up the DOM tree, I can just use that many <code>.parentNode</code>s, but if I don't know how far to go, I'm stuck.</p>
