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

180
Views
¿Cómo traduces X por x cantidad en relación con su posición en Vanilla JS?

Estoy creando un componente de carrusel en React y tengo problemas para implementar la siguiente funcionalidad y la anterior:

 const onClickPrevious = () => { const box = opstionsListRef.current.getBoundingClientRect(); opstionsListRef.current.style.transform = `translateX(${box.x - 300}px)`; }; const onClickNext = () => { const box = opstionsListRef.current.getBoundingClientRect(); opstionsListRef.current.style.transform = `translateX(${box.x + 100}px)`; };

Tuve que disminuir en 300 solo para tener un translateX más decente, pero aún no funciona correctamente al 100%.

about 4 years ago · Santiago Gelvez
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!