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

203
Views
Why does jQuery .height() not work in firefox?

When I console.log(titleHeight); I get 0 in firefox but the correct height in chrome.. Any idea why?

$('.projects__col').each(function() {
    const _this = $(this);
    let titleHeight = title.height();
    console.log(titleHeight); // gives me the correct height in Chrome but 0 in firefox

    _this.click(function () {

        _this.css({
            'transform': `translateY(-${titleHeight}px)`,
            '-o-transform': `translateY(-${titleHeight}px)`,
            '-moz-transform': `translateY(-${titleHeight}px)`,
            '-webkit-transform': `translateY(-${titleHeight}px)`,
        });
    });
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

use this same code after: const _this = $(this);

  $(this)
.load(function() {
    //$('#result1').text('Image is loaded!');   
    let titleHeight = title.height();
    console.log(titleHeight);
})
.error(function() {
    $('#result1').text('Image is not loaded!');
});
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!