I have a .menu
div and when I click that it opens a modal and the .menu
is changes to .menu-open
. This works correctly, but I would like to close my modal when I click .menu-open
, yet nothing happens.
Can you help me please? What's wrong with the code? Thank you!
$(document).ready(function() {
$(".menu").click(function() {
$('.menu-modal').show();
$(".menu").switchClass("menu", "menu-open");
});
});
$(document).ready(function() {
$(".menu-open").click(function() {
$('.menu-modal').hide();
$(".menu-open").switchClass("menu-open", "menu");
});
});