$('span.nav-btn').click(function () {
$('ul#menu').slideToggle();
})
$(window).resize(function () {
if ( $(window).width() > 900) {
$('ul#menu').removeAttr('style')
}
});
$('span.sub-btn').click(function () {
$('ul#sub').slideToggle();
$(this).toggleClass('active'); return ('false');
})
$(window).resize(function () {
if ( $(window).width() > 900) {
$('ul#sub').removeAttr('style')
}
});
http://codepen.io/anon/pen/Hnhea
Good day! I am facing an issue with my code. When the browser window is resized to around 900px, clicking on "MENU" and other items hides the submenu when the mouse moves elsewhere, making it appear as if it's only visible on hover.
Does anyone have a solution for keeping the submenu visible even when the mouse moves away?
Thank you.