Hacker News new | past | comments | ask | show | jobs | submit login

For finding parents matching a selector, there’s a fairly recent addition, Element.closest(). There’s not magnificent support for it yet (notably, no IE), so you will probably need a polyfill.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: