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

183
Views
Multiplique en jQuery, pero un número es de rangeslider, cualquier ayuda sería apreciada

Problema al calcular el número de cambio en vivo. No puedo multiplicar dos números, uno está en vivo (cambiando con el control deslizante, segundo script), así que necesito multiplicar los números.

 <script> $('#customer-worth').on('keyup', function(){ $('#lafinale-profit').text(($(this).val()*($'#closed-deals-roi-calc'.val()))); //this here is the problem. I dont know how to live update number from other script (closed-deals-roi-calc) }); </script> <script> $('.fs-rangeslider_track').on('touchstart',function(e){ $('#closed-deals-roi-calc').text(((parseFloat($('#number-from- slider').innerText)/100*8.7)).toFixed(1)); </script>
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Para hacer lo que necesita, agregue un controlador de eventos de input tanto al texto como al control deslizante de rango. Este controlador de eventos es lo que realiza el cálculo a partir de los valores en esos controles y actualiza el elemento requerido en el DOM, algo como esto:

 let updateUi = () => $('#lafinale-profit').text(($('#customer-worth').val() * $('#closed-deals-roi-calc').val()) || 0); $('#customer-worth, #closed-deals-roi-calc').on('input', updateUi);
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.0/jquery.min.js"></script> Customer worth: <input type="number" id="customer-worth" value="1" /> ROI calc: <input type="range" min="1" max="10" id="closed-deals-roi-calc" value="5" /> <div id="lafinale-profit"></div>

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