2
0
mirror of https://github.com/offen/website.git synced 2024-11-23 01:20:29 +01:00
website/homepage/theme/static/scripts/menu.js

19 lines
494 B
JavaScript
Raw Normal View History

2019-08-14 21:17:29 +02:00
(function($) {
$(function() {
$('nav ul li a:not(:only-child)').click(function(e) {
$(this).siblings('.nav-dropdown').toggle();
$('.dropdown').not($(this).siblings()).hide();
e.stopPropagation();
});
$('html').click(function() {
$('.nav-dropdown').hide();
});
$('#nav-toggle').click(function() {
$('nav ul').slideToggle();
});
$('#nav-toggle').on('click', function() {
this.classList.toggle('active');
});
});
})(jQuery);