webseite/assets/js/nav_toggle.js
L3D fd742c7049 redesign website (!1)
Co-authored-by: L3D <l3d@see-base.de>
Reviewed-on: https://backwesen.de/c3woc/webseite/pulls/1
2022-05-18 00:35:37 +02:00

8 lines
302 B
JavaScript

document.getElementsByClassName('primary_nav__toggle')[0].addEventListener('click', function(){
var nav_list = document.getElementsByClassName('primary_nav__navlist')[0]
if (nav_list.style.display === 'block') {
nav_list.style.display = 'none';
} else {
nav_list.style.display = 'block';
}
});