Poprawa tworzenia ramek z HTML
This commit is contained in:
10
klasa.js
10
klasa.js
@@ -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);
|
||||
});
|
||||
})
|
||||
Reference in New Issue
Block a user