Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!