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

184
Views
JQuery animate scrollTop doesnt work in one page

I cant solve why animate doesnt work only on one page. Here is Link: https://tachomaster.pl

For test I add little gray sqaure on the left top corner, if you click this, script should scroll you a little down. As you can see it doesnt work only on main page, on any other it works.

Here is testing script:

$(document).on('click', '.test', function(event){
    event.preventDefault();
    $('body').animate({
        scrollTop: 500
    }, 800);
});
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

you need to hide overflow for all the containers under your body tag

about 4 years ago · Juan Pablo Isaza Report

0

I fix that by changing from

$('body').animate({
    scrollTop: 500
}, 800);

to

$('html, body').animate({
    scrollTop: 500
}, 800);

I completly dont know why it works that way and didnt work first way ONLY on main page.

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!