feat: add dialogue box
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
// Function to show an element
|
||||
// Function to show an element
|
||||
function showElement(selector) {
|
||||
const element = document.querySelector(selector);
|
||||
if (element) {
|
||||
element.style.display = 'block';
|
||||
}
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
|
||||
|
||||
// Function to randomly select a customer
|
||||
function showRandomCustomer() {
|
||||
@@ -14,6 +15,9 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||
showElement(customers[randomIndex]);
|
||||
}
|
||||
|
||||
// Show dialogue box
|
||||
showElement("#dialogueBox img");
|
||||
|
||||
// Show all dishes
|
||||
showElement('#mapo-tofu img');
|
||||
showElement('#roast-duck img');
|
||||
|
Reference in New Issue
Block a user