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

105
Vistas
Fixed postion horizontal to a certian point js

I am making a horizontal scroll website I have a fixed menu but I want the home button to be get fixed when I get close to it I hope someone understands Idk how to explain it. Here is my code it works on the Y-axis but not on the X-axis.

$(document).scroll(function() {
var x = $(document).scrollTop(), //get page x value 
    header = $("#home");
if(x >= 100)  {
    header.css({position: "fixed", "top" : "0", "left" : "0"});
} else {
    header.css("position", "relative");
}

});

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