0
Skip to Content
WOTAMA
GALLERY
ENQUIRE
WOTAMA
GALLERY
ENQUIRE
GALLERY
ENQUIRE
WOTAMA
hello@wotama.au
Wotama is a branding agency specializing in marketing & photography.
We respectfully acknowledge the past, present and future Traditional Custodians and Elders of Australia, their connection to land, sea and community of Aboriginal and Torres Strait Islander peoples. We recognize they have never ceded sovereignty and their culture remains strong.
HOME
ABOUT
GALLERY
ENQUIRE
PRIVACY POLICY

© Wotama 2024

document.addEventListener("DOMContentLoaded", function() { const buttons = document.querySelectorAll(".filter-btn"); const galleryItems = document.querySelectorAll(".gallery-strips-item"); // Check if elements are selected console.log("Buttons:", buttons); console.log("Gallery Items:", galleryItems); if (buttons.length === 0 || galleryItems.length === 0) { console.warn("Filter buttons or gallery items are not found. Please check the HTML structure."); return; // Prevent further execution if elements are not found } function getDescriptionTag(item) { const img = item.querySelector("img"); return img ? img.getAttribute("alt")?.toLowerCase() : ""; // Get alt text and convert to lowercase } buttons.forEach(button => { button.addEventListener("click", () => { const filter = button.dataset.filter.toLowerCase(); console.log(`Filtering by: ${filter}`); // Log the filter to check if the button click is registered galleryItems.forEach(item => { const description = getDescriptionTag(item); // Get the alt text of the image // Show item if it matches the filter, or if the filter is "all" if (filter === "all" || description.includes(filter)) { item.style.display = ""; // Show item } else { item.style.display = "none"; // Hide item } }); }); }); });