I've implemented a menu bar with categories that reveal subcategories in a dropdown when hovered over.
You can view the functionality I've already created here: http://www.bootply.com/9Qz14HIz8R
Currently, when hovering over a category, its background changes to gray. However, as soon as you move the cursor down to the subcategory dropdown, the gray background disappears from the category.
I am looking for a way to keep the category background gray even when moving the cursor to the subcategory dropdown, and only remove it when the cursor is outside the dropdown box.
I believe using JavaScript or jQuery to make the category remain active on hover and stay active while the cursor is on the subcategories dropdown would be the solution. It should then deactivate once the cursor moves out of the dropdown box.
If you have any ideas on how to solve this issue or if you suggest a different approach, I'd love to hear them.