Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

126
Vistas
Lazyload: How to deal with internet connection lost?

Im using Lazysizes and trying to do something if user lose internet connection and keep scrolling, then there is no image shown How can i make if images are failed to donwload to replace them with src image? i tried to put in src loading image and replace on error but is not working because it return error again and again ...

document.addEventListener('error', function(e){ if(e.target.nodeName == 'IMG'){e.target.src = e.target.getAttribute('src')} }, true);

HTML

<div class="image">
 <a href="<?php echo $product['href']; ?>">
   <img src="<?php echo $preloader?>" data-src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" class="img-responsive lazyload" />
</a>
</div>
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda