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

173
Vistas
Why do the images in my sliders load all at once?

I don't get it. Lazy image loading is enabled by default and I even tried this JavaScript from a similar question (apparently that fixed it. Also maybe it doesn't work for me because I don't use jquery?). I also tried content-visibility: hidden until I realized that Firefox or Safari doesn't even support it... (why?????)

let element = document.getElementsByTagName("img");

Array.from(element).forEach(i => {
    i.style.display = "block";
});

I think the other images on the other slider still don't load until I've scrolled to it so there does seem to be some kind of optimization? I honestly can't tell anymore. To me it still looks like they all try to load all at once when I clear my cache & refresh. My goal is to just load the images once they're actually displayed and scrolled onto in the slider but I can't get it to work. The images are quite large and I should downsize them but this would still help either way.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can do it simply by using CSS. Provide display: none; to all the default slides and apply display: block; only to the active slide through CSS. This will solve your problem.

about 4 years ago · Juan Pablo Isaza Denunciar
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