Hello, hum, the problem is that the display of the sub-menu is based on CSS, you would have to make a few changes and add a script for it, something like this:
(css/custom.css)
#header nav ul.nav-main li.dropdown:hover > ul {
display: none;
}
#header nav ul.nav-main li.dropdown.hover > ul {
display: block;
}
(js/custom.js)
$('#header li.dropdown').mouseenter(function() {
$(this).addClass('hover');
}).mouseleave(function() {
$(this).removeClass('hover');
});
Then add a custom event in the link that removes the “hover” class from the parent item via JS, it will make the item to closes.
Hope it helps.
Thanks.