2
0
mirror of https://github.com/offen/website.git synced 2024-12-25 22:30:21 +01:00
website/homepage/theme/static/scripts/menu.js

17 lines
462 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 () {
$(this).closest('nav').find('ul').slideToggle()
$(this).toggleClass('active')
})
})
})(window.jQuery)