forked from LiveCarta/LiveCartaWP
LAW-7304
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,3 +1,16 @@
|
||||
const imgs = document.querySelectorAll('.ci-top img');
|
||||
if (imgs.length) {
|
||||
imgs.forEach(img => {
|
||||
img.setAttribute('onload', "this.classList.add('loaded')");
|
||||
img.setAttribute('onerror', "this.classList.add('loaded')");
|
||||
img.insertAdjacentHTML('afterend', '<span class="skeleton skeleton-casebook-top"></span>');
|
||||
if (img.complete) {
|
||||
console.log(1);
|
||||
img.classList.add('loaded');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
window.addEventListener('DOMContentLoaded', function(){
|
||||
|
||||
// home page scripts start
|
||||
|
||||
Reference in New Issue
Block a user