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

146
Views
jQuery scroll top function is not working

So here is my code and I have this error and I don't understand why. I need some help here... I don't know why is this happening : Property does not exist on type '.js--section-plan'.ts(2339) when i hover on the offset() in vscode

$('.js--scroll-to-plans').click(function() 
  { $('html, body).animate({scrollTop:. 
    ('.js--section- 
    plan').offset().top},1000) });
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You should put a quote mark on the end of the body, just right before the paranthesis. Also that period isn't needed after the colon.

$('.js--scroll-to-plans').click(function() { 
  $('html, body').animate({
    scrollTop: $('.js--section- plan').offset().top
  }, 1000); 
});
about 4 years ago · Juan Pablo Isaza Report

0

There are some minor typos in your script. Do not forget to use $-sign.

$('.js--scroll-to-plans').click(function() { 
    $('html, body').animate({
   scrollTop: $('.js--section-plan').offset().top
 }, 1000); 
});
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!