1window.onload = function () { 2 const img = [ 3 '/child/assets/img/bienvenidos/slider.jpg', 4 '/child/assets/img/bienvenidos/slider2.jpg', 5 '/child/assets/img/bienvenidos/slider4.jpg', 6 '/child/assets/img/bienvenidos/slider1.jpg', 7 '/child/assets/img/bienvenidos/slider3.jpg', 8 ]; 9 10 const title = [ 11 'thrilling landscape', 12 'cosy beach bars and restaurants', 13 'fantastic beach', 14 'varied range of leisure activities', 15 'great excursion destinations', 16 ] 17 const subtitle = [ 18 'beautiful sandy beach, romantic river scenery and breathtaking views', 19 '...something to suit every taste', 20 'within easy walking distance of all houses', 21 'from fishing to hiking, everything is possible', 22 'amazing theme parks, majestic castles, bustling weekly markets, ...' 23 24 ] 25 const tiempo = 5000; 26 let posicionActual = 0; 27 let posicionActualTexto = 0; 28 let $imagen = document.querySelector('#slide'); 29 let titulo = document.querySelector('#titulo'); 30 let subtitulo = document.querySelector('#subtitulo'); 31 32 function pasarFoto() { 33 if (posicionActual >= img.length - 1) { 34 posicionActual = 0; 35 } else { 36 posicionActual++; 37 } 38 39 if(posicionActualTexto >= title.length - 1) { 40 posicionActualTexto = 0; 41 } else { 42 posicionActualTexto++; 43 } 44 45 if(posicionActualTexto >= subtitle.length - 1) { 46 posicionActualTexto = 0; 47 } else { 48 posicionActualTexto++; 49 } 50 renderizarImagen(); 51 ponerTexto(); 52 } 53 54 function renderizarImagen() { 55 $imagen.style.backgroundImage = `url(${img[posicionActual]})`; 56 } 57 58 function ponerTexto() { 59 titulo.innerHTML = title[posicionActualTexto]; 60 subtitulo.innerHTML = subtitle[posicionActualTexto]; 61 } 62 63 function ejecutar() { 64 intervalo = setInterval(pasarFoto, tiempo); 65 } 66 67 window.onload = ejecutar(); 68 renderizarImagen(); 69}
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.