mirror of
https://github.com/hyzendust/hyzendust.github.io.git
synced 2026-04-16 05:38:33 +02:00
Update: hamburger menu for mobile devices
This commit is contained in:
@@ -22,3 +22,14 @@
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
(function () {
|
||||
var check = document.getElementById('mobile-menu-check');
|
||||
if (!check) return;
|
||||
document.addEventListener('click', function (e) {
|
||||
if (!check.checked) return;
|
||||
var menu = check.closest('.brand__mobile-menu');
|
||||
if (menu && !menu.contains(e.target)) check.checked = false;
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user