allthingssmitty.com
Using closest() to return the correct DOM element
6
Sometimes you need JavaScript to target specific selectors in the DOM. The closest() method can help you do just that. Read full article