Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

175
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda