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

121
Views
JavaScript for hiding divs after passing a certain point on the page

Right now, I have it so a button appears after scrolling a certain length down the page but once you click on the button and it brings you to #ordersection, I can't get the button to disappear (when it reaches #ordersection). Right now, I have

var mediaQuery = window.matchMedia( "(max-width: 768px)" );
if (mediaQuery.matches) {
    // window width is at less than 768px
    $(document).scroll(function () {
        var y = $(this).scrollTop();
        if (y > 23500 && y < 40000) {
            $('.order-now-btn-a').fadeIn();
        } else {
            $('.order-now-btn-a').fadeOut();
        }
    });
}
else {
    // window width is greater than 768px
    $(document).scroll(function () {
        var y = $(this).scrollTop();
        if (y > 1000 && y < 80000) {
            $('.order-now').fadeIn();
        } else {
            $('.order-now').fadeOut();
        }
    });
} 

'''

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!