1require(['domReady'], 2 function (domReady) { 3 'use strict'; 4 5 var elements = {}; 6 7 var classes = { 8 heroReady: 'at-hero--ready' 9 }; 10 11 function init() { 12 elements.hero = document.querySelector('.at-hero'); 13 elements.image = document.querySelector('.at-hero__picture'); 14 15 if (elements.image) { 16 window.addEventListener('scroll', setNewImagePosition); 17 elements.hero.classList.add(classes.heroReady); 18 } 19 } 20 21 function setNewImagePosition() { 22 var scrollTop = (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop; 23 elements.image.style.transform = 'translateY(' + Math.round(scrollTop / 3) + 'px)'; 24 } 25 26 domReady(init); 27 } 28);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.