i have 1 fields of input type...and if i changed the value,it will multiplied the values on the loop..here is the example...
<input type='number' id='values' name='values' onkeyup='multiplied()'>
<?php
foreach($data as $value)
{
$no = 1;
echo "<input type='number' class='form-control value' id='value' name='value' readonly value=".$value['value'].">";
echo "<input type='number' class='form-control' id='total' name='total' readonly >";
$no++;
}
?>
function multiplied()
{
var values = $('#values').val();
var value = $('.value').val();
total = values * value;
$('#total').val(total)
}
how do i multiplied values dynamically when i change the values of id='values'
Thank you,any helps will be appriciated