Order Online JavaScript Code Documentation

Function: default_item_active

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:


function default_item_active() {
    // ... Function code ...
}
        

Function: checkItemsDisplay

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:


function checkItemsDisplay() {
    // ... Function code ...
}
        

Function: refresh_selection

Removes all other menu category buttons' active classes. If other category buttons are active, removes the "category-active" class and hides associated items.

Parameters:


function refresh_selection(btn_name) {
    // ... Function code ...
}
        

Function: category_active

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:


function category_active() {
    // ... Function code ...
}
        

Function: activateCartListener

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:


function activateCartListener() {
    // ... Function code ...
}

// Call the function to activate the cart listener
activateCartListener();