Our New White Paper: Artificial Intelligence in GCC Retail

Published

4 min read

.copy-button { position: relative; } .tooltip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background-color: #333; color: white; padding: 5px 10px; border-radius: 4px; opacity: 0; transition: opacity 0.3s ease; white-space: nowrap; pointer-events: none; } .tooltip.show { opacity: 1; } async function copyToClipboard() { const button = document.getElementById('copyButton'); const tooltip = button.querySelector('.tooltip') || createTooltip(button); try { await navigator.clipboard.writeText(window.location.href); // Show tooltip tooltip.textContent = 'Copied!'; tooltip.classList.add('show'); // Hide tooltip after 2 seconds setTimeout(() => { tooltip.classList.remove('show'); }, 2000); } catch (err) { console.error('Failed to copy: ', err); tooltip.textContent = 'Copy Failed'; tooltip.classList.add('show'); setTimeout(() => { tooltip.classList.remove('show'); }, 2000); } } function createTooltip(button) { const tooltip = document.createElement('div'); tooltip.classList.add('tooltip'); tooltip.textContent = 'Copy Link'; button.classList.add('copy-button'); button.appendChild(tooltip); return tooltip; } // Add event listener to the button document.getElementById('copyButton').addEventListener('click', copyToClipboard);

Our New White Paper: Artificial Intelligence in GCC Retail

Discover our new ai white paper the future of retail

More news

Search

Discover Al-Futtaim’s core business areas,
driving innovation across industries.