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

113
Views
How to keep track of range slider in constant time

This is what I have to represent the text box and the slider:

          <input id="rangeInputM" type="range" min="-10" max="10" oninput="m1.value=rangeInputM.value" />
          <input id="m1" type="number" value="1" min="-200" max="200" oninput="rangeInputM.value=m1.value" />

I know how to keep track of user input into the text box:

   $("#m1").keyup(function(){
    
    var m1,b1 = 0;

    m1 = parseFloat($("#m1").val());
    b1 = parseFloat($("#b1").val());

   
    var myGraph = new Graph({
     canvasId: 'Graph',
     minX: -10,
     minY: -10,
     maxX: 10,
     maxY: 10,
     unitsPerTick: 1
    });      
    
    myGraph.drawLine(m1, b1, 'blue', 3);
  });

But I do not know how to do the same thing to the range slider to keep track of that value. This link is if you want to test the entire code: https://jsfiddle.net/csCoder/eLxfrn10/9/

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!