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

140
Visualizações
Why the background increase in every click using $(document).height()?

I am using the $(document).height() to assign dynamically the height to a background.

Why occurs that when the document is clicked the background image increase it height? The document height is the same

function setDocumentHeight(){
  var height = $(document).height(); console.log("Document Height " + height);
  $(".bg").css({"height":height});
  
}
setDocumentHeight();
  
$(document).click(function(e) {
    if (e.button == 0) { setDocumentHeight(); }
});

https://jsfiddle.net/jd8n6qa9/

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

set top and bottom 0 to absolute background. it will solve this issue.

.bg {top:0;bottom:0;}
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