Hiding responsive menu - Post ID 284038
I have the foundation responsive menu working when you click hamburger with data-toggle and it shows/hides the menu. But how do I make it just hide the menu if you click anywhere off the menu?
$('html').click(function(){
if( !$(event.target).hasClass('targetDiv') ){
$('.targetDiv').hide();
}
});
just the target div from this with your menu class and then paste it
if( !$(event.target).hasClass('targetDiv') ){
$('.targetDiv').hide();
}
});
just the target div from this with your menu class and then paste it
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.