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:
$(\
Modern browsers have the Element.closest() method.
Example:
document.querySelector('.navPanel img').closest('td')
Reference: https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
Here you can check which browsers have built-in support: https://caniuse.com/#feat=element-closest
When there is no support in the browser the following polyfill could be used: https://github.com/jonathantneal/closest