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

108
Vistas
how i can create top/button and left/right scrollbar moving button?

is there any way to make scrollbar moving button using javascript/jquery.i have taken screenshot from google sheet they have that option but i am not able to get how i can do the same.

Example Image

expamle image with zoom

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

They are probably doing something like this:

First, you'll need to hide the default scrollbars, as per this question.

Next, you'll need to implement your own scrollbars, for example something like this project on GitHub.

Finally, when implementing your scrollbars, create buttons, (perhaps using a <button> tag). In the button click handler, change .scrollTop or .scrollLeft to scroll the element incrementally.

For example:

document.getElementById( "my-scroll-left-button" ).onclick = () => {

    document.getElementById( "my-scroll-container" ).scrollLeft += 30;

}

document.getElementById( "my-scroll-right-button" ).onclick = () => {

    document.getElementById( "my-scroll-container" ).scrollLeft -= 30;

}

document.getElementById( "my-scroll-up-button" ).onclick = () => {

    document.getElementById( "my-scroll-container" ).scrollTop -= 30;

}

document.getElementById( "my-scroll-down-button" ).onclick = () => {

    document.getElementById( "my-scroll-container" ).scrollTop += 30;

}

Be warned: If you are using CSS scroll-snapping, manually changing .scrollTop and .scrollLeft might cause issues in some browsers. (I wouldn't worry about it though, since scroll-snapping is not usually a critical feature.)

about 4 years ago · Juan Pablo Isaza Denunciar
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