BMW Cleveland
6135 Kruse Dr Solon, OH 44139
Today 9:00 AM - 6:00 PM Service 7:30 AM - 6:00 PM
Open Today !
Sales: 9:00 AM - 6:00 PM
Service: 7:30 AM - 6:00 PM
Parts: 7:30 AM - 5:30 PM
All Hours

New Bmw X6 Inventory

document.addEventListener("DOMContentLoaded", function () { // --- Existing Text Replacement Script --- function replaceTextContent(element) { element.childNodes.forEach(function (node) { if (node.nodeType === Node.TEXT_NODE) { node.textContent = node.textContent .replace(/\bBmw\b/g, "BMW") .replace(/used Inventory/g, "Used Inventory") .replace(/new Inventory/g, "New Inventory") .replace(/cpo Inventory/g, "BMW Certified") .replace(/months\+/g, "months +") .replace(/MSRP starting at\s+/g, "MSRP starting at ") // Removes extra spaces after "at" .replace(/Bodystyle/g, "Body Style") .replace(/ \!/g, ""); // Removes " !" entirely } else { replaceTextContent(node); } }); } // Apply text replacement to the initial DOM replaceTextContent(document.body); // Set up a MutationObserver to handle dynamically added elements const observer = new MutationObserver(function (mutationsList) { mutationsList.forEach(function (mutation) { mutation.addedNodes.forEach(function (addedNode) { if (addedNode.nodeType === Node.ELEMENT_NODE) { replaceTextContent(addedNode); } }); }); }); // Observe the DOM for changes observer.observe(document.body, { childList: true, subtree: true, }); // --- Dropdown Behavior for Links --- document.querySelectorAll(".h-menu-item").forEach(function (menuItem) { const parentContainer = menuItem.closest(".d-flex.position-relative"); const dropdown = parentContainer ? parentContainer.querySelector("#primary-submenu") : null; if (dropdown) { // Show dropdown on hover menuItem.addEventListener("mouseenter", function () { dropdown.style.display = "block"; }); dropdown.addEventListener("mouseenter", function () { dropdown.style.display = "block"; }); // Hide dropdown on mouseleave with delay dropdown.addEventListener("mouseleave", function () { setTimeout(function () { dropdown.style.display = "none"; }, 200); // Short delay for smoother transitions }); menuItem.addEventListener("mouseleave", function () { setTimeout(function () { dropdown.style.display = "none"; }, 200); // Matches the same delay }); // Ensure the link is clickable menuItem.addEventListener("click", function (event) { const href = menuItem.getAttribute("href"); if (href) { window.location.href = href; // Navigate to the link } }); } }); });