Added burger button for mobile - to hide the Quit/Menu (and future) UI buttons, giving more room for UI elements
This commit is contained in:
1 parent
ef7a0f06ed
commit
ef77fe7259
3 files changed
+64
-3
No files matched your search
@@ -3850,5 +3850,22 @@ function hideSongDurationBar() {
|
||||
document.getElementById('songDurationBar').style.display = 'none';
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const burgerButton = document.getElementById('burgerButton');
|
||||
const menuButtons = document.getElementById('menuButtons');
|
||||
|
||||
burgerButton.addEventListener('click', () => {
|
||||
menuButtons.classList.toggle('show');
|
||||
});
|
||||
|
||||
// Close the menu when clicking outside
|
||||
document.addEventListener('click', (event) => {
|
||||
if (!burgerButton.contains(event.target) && !menuButtons.contains(event.target)) {
|
||||
menuButtons.classList.remove('show');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
init();
|
||||
Reference in new issue
Block a user