nyxin

u/nyxin



r/webdev•

Hi all. I'm trying to create a navigation menu that has multiple dropdowns inside it. I'm creating the animation/dropdown by adding a 'menu-open' class with jquery, however, whenever I hover over one item, all of the 'sub-nav-list' elements get the 'menu-open' class. I would like the class to be applied only to the single dropdown that I'm currently hovering over. I've tried using $(this).closest, $(this).find, $(this).children, and $(this).child all with the same result; obviously there's something I'm completely missing here.

Link to codepen

Appreciate any insights =)

18