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

133
Vistas
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 Respuestas
Responde la pregunta

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 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