title: Vanilla JavaScript .closest without jQuery
body: <p>I'm working on an application that only has jQuery 1.1 installed which dosn't support the .closest method.</p>
  
  <p>My script currently looks like this:</p>
  
  <pre><code>$('.navPanel').find('img').closest('td').hide();
  </code></pre>
  
  <p>So I'm looking for every image in the .navPanel and traversing up the DOM and hiding the td that it sits in. Does anyone know if there is a vanilla JavaScript function I could simply add to my script that polyfills the missing .closest method?</p>
  
  <p>Thanks for your time.</p>