Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

142
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda