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

124
Views
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 answers
Answer question

0

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

about 4 years ago · Juan Pablo Isaza Report

0

SOLVED

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

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