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

141
Views
ScrollTop BG ChangeColor

I'm trying to change the color of the background whenever i enter into a new section. I think this is the direction i should follow, but I'm really lost at this point, cause i don't know if it is even posible to make the BG change in the class instead of the height pixels. The first part is what i want to make, and the second one is the one i have now and i want to change. Thank you so much <33

$(function() {
$(window).scroll(function() {
    if ($(this).scrollTop() > ('parte2')) {
        $('body, html').addClass('changeColor');
    } else {
        $('body, html').removeClass('changeColor');
    }
    if ($(this).scrollTop() > 6450) {
        $('body, html').addClass('changeColor2');
    } else {
        $('body, html').removeClass('changeColor2');
    }
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!