I'm working on an application that only has jQuery 1.1 installed which dosn't support the .closest method.

My script currently looks like this:

```
$('.navPanel').find('img').closest('td').hide();

```

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?

Thanks for your time.