mirror of
https://github.com/offen/website.git
synced 2024-11-23 09:20:33 +01:00
19 lines
494 B
JavaScript
19 lines
494 B
JavaScript
|
(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);
|