Poprawa tworzenia ramek z HTML

This commit is contained in:
2025-12-15 09:13:21 +01:00
parent 4319ffef03
commit a1d1a64aac
4 changed files with 37 additions and 12 deletions

View File

@@ -2146,10 +2146,12 @@ async function idmPrepareHotspotObject(selectedContainerEl){
};
if(selectedContainerEl?.dataset?.lazy) idmHotspotObj.options = {lazy: selectedContainerEl?.dataset?.lazy === "true" ? true : false};
new IdmHotspot(idmHotspotObj);
}
document.querySelectorAll(".hotspot__wrapper.idm__hotspot").forEach(currentHotspot=>{
idmPrepareHotspotObject(currentHotspot);
});
document.addEventListener("DOMContentLoaded", ()=>{
document.querySelectorAll(".hotspot__wrapper.idm__hotspot:not(.--init)").forEach(currentHotspot=>{
idmPrepareHotspotObject(currentHotspot);
});
})