2
0
mirror of https://github.com/offen/website.git synced 2024-11-23 09:20:33 +01:00
website/homepage/theme/static/scripts/functions.js
2019-08-14 21:17:29 +02:00

20 lines
550 B
JavaScript

/** code by webdevtrick ( https://webdevtrick.com ) **/
(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);