Using closest() to return the correct DOM element

added by JavaScript Kicks
3/25/2019 8:06:00 AM

346 Views

I was recently working with a vertical navigation component and ran into a hiccup where the JavaScript code wouldn't fire depending on where I clicked on the menu item link. I did some digging and thought I'd share a little about what I discovered and how I was able to resolve the problem.


0 comments