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