I am working on an application that only has jQuery 1.1 installed, which does not support the .closest method.
Now my script looks like this:
$('.navPanel').find('img').closest('td').hide();
So, I look for every image in .navPanel and examine the DOM and hide the td it sits in. Does anyone know if there is a vanilla JavaScript function that I could just add to my script that polyfills the missing .closest method?
Thank you for your time.
source share