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
Desplácese hasta no permitir que la página se mueva

Estoy tratando de activar el desplazamiento cuando el usuario llega a un div específico, sin embargo, después de desplazarse a div , no permite que la página suba o baje. Algo atascado. Cualquier forma de evitar este comportamiento para que solo se active cuando el usuario se desplaza desde la parte superior.

 jQuery(window).scroll(function() { var hT = jQuery('.trigegr').offset().top, hH = jQuery('.trigegr').outerHeight(), wH = jQuery(window).height(), wS = jQuery(this).scrollTop(); if (wS > (hT + hH - wH)) { jQuery('html, body').animate({ scrollTop: jQuery("#scroll-too").offset().top }, 2000); } });
 div { height: 800px; background: red; } h1 { display: none; }
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div>Scroll Down</div> <h1 class="trigegr">I am The H1</h1> <br><br><br><br><br><br> <h2 id="scroll-too">I am The H2</h2>

about 4 years ago · Juan Pablo Isaza
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!