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

362
Views
jQuery scrollTop not working inside iframe on Iphone

This works everywhere, except for iframe on iOS.

the example is as

when you click on a category it should scroll , only I have the problem that it doesn't work on IOS

https://codepen.io/fdemian/full/ZjpXBe

I used

        $('html, body').animate({ scrollTop: offsetTop }, 0);
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You have to animate $("body") and not $("html, body") because the mobile ios doesn’t know it

about 4 years ago · Juan Pablo Isaza Report

0

I testesd it again. Seeing other solutions, the following function worked for me:

  • for smartphone (apple, android)
    window.scrollTo(x, y)
  • for pc
    $('html,body').animate({scrollTop: x, scrollLeft: y}, milliseconds)
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!