$0.00 0

Cart

No products in the cart.

Continue shopping

You may be interested in…

Your cart is currently empty!


New in store

  • +1 (605) 475 6968
  • 400 broad st, seattle, WA
  • info@oclock.com
© 2023 Oclock. all rights reserved
document.addEventListener("DOMContentLoaded", function () { function updateButtonText() { const selectedMaterialElement = document.querySelector('.variable-items-wrapper[data-attribute_name="attribute_material-piece"] .variable-item.selected'); const selectElement = document.querySelector('select[name="attribute_material-piece"]'); const addToCartButton = document.querySelector('.single_add_to_cart_button'); if (!addToCartButton) { console.error("Add to Cart button not found."); return; } let selectedMaterial = ""; // Check the selected visible button first if (selectedMaterialElement) { selectedMaterial = selectedMaterialElement.dataset.value; } // If no button is selected, check the dropdown (in case Breakdance triggers this) const selectElement = document.querySelector('select[name="attribute_material-piece"]'); if (selectElement) { selectElement.addEventListener("change", updateButtonText); } // Backup: Use MutationObserver to detect any UI updates const observer = new MutationObserver(updateButtonText); observer.observe(document.body, { subtree: true, childList: true }); // Run once on page load updateButtonText(); });