ElementById(id);
                if (!element) continue;  // safety check if element not found
                element.setAttribute("data-title", title);
            }

            let tooltipEl = null;
            let currentTarget = null;

            function createTooltip(el) {
                if (tooltipEl) removeTooltip();

                const text = el.getAttribute('data-title');
                if (!text) return;

                tooltipEl = document.createElement('div');
                tooltipEl