Spaces:
Running
Running
Download script.js from Alascoci/delivery-dash-express: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/spaces/Alascoci/delivery-dash-express/resolve/main/script.js
- Command line
-
hf download hf://spaces/Alascoci/delivery-dash-express/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Alascoci/delivery-dash-express/resolve/main/script.js
1.35 kB
| // Initialize tooltips | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Initialize any tooltips if needed | |
| const tooltipTriggers = document.querySelectorAll('[data-tooltip]'); | |
| tooltipTriggers.forEach(trigger => { | |
| const tooltipText = trigger.getAttribute('data-tooltip'); | |
| const tooltip = document.createElement('div'); | |
| tooltip.className = 'hidden absolute z-50 bg-gray-900 text-white text-xs rounded py-1 px-2'; | |
| tooltip.textContent = tooltipText; | |
| trigger.appendChild(tooltip); | |
| trigger.addEventListener('mouseenter', () => { | |
| tooltip.classList.remove('hidden'); | |
| tooltip.classList.add('block'); | |
| }); | |
| trigger.addEventListener('mouseleave', () => { | |
| tooltip.classList.remove('block'); | |
| tooltip.classList.add('hidden'); | |
| }); | |
| }); | |
| // Simulate loading data | |
| setTimeout(() => { | |
| const loadingElements = document.querySelectorAll('.skeleton'); | |
| loadingElements.forEach(el => { | |
| el.classList.remove('skeleton'); | |
| }); | |
| }, 1500); | |
| }); | |
| // Delivery status update function | |
| function updateDeliveryStatus(deliveryId, newStatus) { | |
| console.log(`Updating delivery ${deliveryId} to status: ${newStatus}`); | |
| // In a real app, this would make an API call | |
| } |