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

182
Vistas
Multiply in jQuery, but one number is from rangeslider, any help would be appreciated

Problem in calculating live changing number i cannot multiply two numbers, one is live ( changing with slider,secon script) so i need to multiply the numbers

<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 Respuestas
Responde la pregunta

0

To do what you require, add an input event handler to both the text and the range slider. This event handler is what performs the calculation from the values in those controls and updates the required element in the DOM, something like this:

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 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