All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 26s
15 lines
411 B
JavaScript
15 lines
411 B
JavaScript
document$.subscribe(({ document }) => {
|
|
const elements = document.querySelectorAll("[data-image-tooltip]")
|
|
|
|
elements.forEach(el => {
|
|
const img = el.getAttribute("data-image-tooltip")
|
|
|
|
if (el._tooltipInitialized) return
|
|
el._tooltipInitialized = true
|
|
|
|
window.document$.app?.tooltip?.create(el, {
|
|
html: `<img src="${img}" style="max-width:200px;">`,
|
|
interactive: true
|
|
})
|
|
})
|
|
}) |