Line 145: | Line 145: | ||
'use strict'; | 'use strict'; | ||
// Page is loaded | // Page is loaded | ||
− | const objects = document.getElementsByClassName(' | + | const objects = document.getElementsByClassName('low-res-parallax'); |
Array.from(objects).map((item) => { | Array.from(objects).map((item) => { | ||
// Start loading image | // Start loading image | ||
Line 153: | Line 153: | ||
img.onload = () => { | img.onload = () => { | ||
− | item.classList.remove(' | + | item.classList.remove('low-res-parallax'); |
return item.nodeName === 'IMG' ? | return item.nodeName === 'IMG' ? | ||
item.src = item.dataset.src : | item.src = item.dataset.src : |
Revision as of 15:39, 14 October 2018