Menu Location JavaScript Code Documentation

Map Data

Represents a map of store locations and their corresponding Google Maps embed links.


const myMap = new Map([
    ["cstat", "https://www.google.com/maps/embed?..."],
    ["dallas", "https://www.google.com/maps/embed?..."],
    ["houston", "https://www.google.com/maps/embed?..."],
]);
        

Function: default_item_active

Resets the active state for menu buttons and displays the default item.


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

Function: checkItemsDisplay

Checks whether all menu items are hidden and adjusts the display of the default item accordingly.


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

Function: category_active

Handles the activation of a menu category button, displaying its associated items and updating the selection.


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

Function: refresh_selection

Refreshes the selection by deactivating other active menu buttons and hiding their associated items.


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

Function: getJSON

Generates JSON data based on the type and store parameters.


function getJSON(type, store) {
    // ... Function code ...
}
        

Function: changeStore

Changes the store and updates the map display and user information.


function changeStore(store) {
    // ... Function code ...
}
        

Event: window.onload

Handles actions on the window.onload event, setting the initial map display.


window.onload = function() {
    // ... Event code ...
};
        

Function: updateInfo

Updates information on the server based on the specified type and store.


function updateInfo(type, store) {
    // ... Function code ...
}