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

126
Vistas
How do I make a range slider slower?

I made a range slider using html/css/js to go with my lua nui. It works great for the most part, but whenever I slide too quickly on the slider, it doesn't perform the function correctly. Whenever I slide my slider to the left, it makes certain values go down and up for the right. If I slide it too crazy, the values all go back to 0, so I figured if I could cap the speed at which the user can slide it, the function would never go wrong. Didn't find any relevant google searches for this, so I'd appreciate any replies. Also, I'm new to sliders so give me a break if this is a really dumb quesion. I'm more familiar with lua.

the html

<div class="slidecontainer" style="position: fixed;top:13%;left:5%;">
 <input type="range" min="0.0" max="10.0" value="5.0" class="slider" id="myRange">
</div>

the js

 var slider = document.getElementById("myRange");
 slider.oninput = function() {
        if (slider.value >= 0.0 && slider.value < 1.0) {
            $.post('https://skineditor/changefaceshapemix', JSON.stringify({
                value: '1-10'
            }));
        } else if (slider.value > 1.0 && slider.value < 2.1) {
            $.post('https://skineditor/changefaceshapemix', JSON.stringify({
                value: '11-20'
            }));
// this keeps on going all the way to 10 (also i know that the string values are different)

how i have it right now is if the slider's value is anywhere between the numbers then it posts back to my lua and does a function

im not showing the lua because i've verified its not an issue with that code, my function only goes wrong if i slide too quick on the slider

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

0

Please try to set $SlideDuration option. Also you can try to set $Idle option.

about 4 years ago · Juan Pablo Isaza Denunciar

0

SOLVED

I used an alternative way of saving the value and using it with MySQL.

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