Spaces:
Running
Running
Update scripts/ui.js
Browse files- scripts/ui.js +1 -8
scripts/ui.js
CHANGED
|
@@ -1,18 +1,11 @@
|
|
| 1 |
-
// scripts/ui.js
|
| 2 |
-
|
| 3 |
export function initUI() {
|
| 4 |
-
alert("Step 3: initUI() is running..."); // <-- DEBUG ALERT
|
| 5 |
-
|
| 6 |
const productionButton = document.getElementById('production-button');
|
| 7 |
const productionPanel = document.getElementById('production-panel');
|
| 8 |
|
| 9 |
if (productionButton && productionPanel) {
|
| 10 |
-
alert("Step 4: Found video button and panel. Adding click listener..."); // <-- DEBUG ALERT
|
| 11 |
productionButton.addEventListener('click', () => {
|
| 12 |
-
|
| 13 |
productionPanel.classList.toggle('open');
|
| 14 |
});
|
| 15 |
-
} else {
|
| 16 |
-
alert("ERROR: Could NOT find the video button or panel in the HTML!"); // <-- DEBUG ALERT
|
| 17 |
}
|
| 18 |
}
|
|
|
|
|
|
|
|
|
|
| 1 |
export function initUI() {
|
|
|
|
|
|
|
| 2 |
const productionButton = document.getElementById('production-button');
|
| 3 |
const productionPanel = document.getElementById('production-panel');
|
| 4 |
|
| 5 |
if (productionButton && productionPanel) {
|
|
|
|
| 6 |
productionButton.addEventListener('click', () => {
|
| 7 |
+
// This toggles the 'open' class which is defined in your main.css
|
| 8 |
productionPanel.classList.toggle('open');
|
| 9 |
});
|
|
|
|
|
|
|
| 10 |
}
|
| 11 |
}
|