Difference between revisions of "Team:Uppsala/Team"

Line 374: Line 374:
 
           'use strict';
 
           'use strict';
 
             // Page is loaded
 
             // Page is loaded
           const objects = document.getElementsByClassName('asyncImage');
+
           const objects = document.getElementsByClassName('low-res-parallax');
 
           Array.from(objects).map((item) => {
 
           Array.from(objects).map((item) => {
 
           // Start loading image
 
           // Start loading image
Line 381: Line 381:
 
           // Once image is loaded replace the src of the HTML element
 
           // Once image is loaded replace the src of the HTML element
 
           img.onload = () => {
 
           img.onload = () => {
           item.classList.remove('asyncImage');
+
           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 18:12, 16 October 2018