Resets the menu category view to the default category prompt. Iterates through menu buttons, removes the "category-active" class, and hides associated items. Displays the default category prompt.
Parameters:
None
function default_item_active() {
// ... Function code ...
}
Removes the default category prompt when other categories are active. Checks if any category button is active; if none are active, shows the default category prompt.
Parameters:
None
function checkItemsDisplay() {
// ... Function code ...
}
Removes all other menu category buttons' active classes. If other category buttons are active, removes the "category-active" class and hides associated items.
Parameters:
btn_name
(string): The name of the category button.
function refresh_selection(btn_name) {
// ... Function code ...
}
Activates a menu category button, refreshes the selection, and updates the display. Sets the associated items to be displayed, removes other active category buttons, and updates the display.
Parameters:
None
function category_active() {
// ... Function code ...
}
Displays or hides the cart checkout based on the "active" class on the page container. Toggles the "active" class on the page container when the checkout button is clicked.
Parameters:
None
function activateCartListener() {
// ... Function code ...
}
// Call the function to activate the cart listener
activateCartListener();