I created a mobile menu with a toggle switch.
When I click on the div dropdown, it opens. When I click again, it closes. But I want it to open with one click and close with a double click.
What do I need to add to my code?
$('.dropdown-menu').click(function() {
$('.dropdown-menu').not(this).children('ul').slideUp("slow");
$(this).children('ul').slideToggle("slow");}
);
$('.dropdown-menu').blur(function() {
$('.dropdown-inside').hide('slow', function() {
});
});
source
share