I am trying to create 2 sliders that when moving them operate with the values of the moment and show me the result in turn. I put the code to show the case:
<div id="slider_1" class="slider"></div><input id="slider_1_val
</input> EUROS
<div id="slider_2" class= "slider"></div>
<input type="text" min="30" max="90" step="30"></input> DIAS
Resultado:<input id="amount"></input>
var weightSliderValue = 0;
var exerciseSliderValue = 0;
function changeValue(){
var currentSliderValue = (weightSliderValue -
(weightSliderValue * exerciseSliderValue));
$( "#slider_1_val" ).val( weightSliderValue );
$( "#slider_2_val" ).val( exerciseSliderValue );
$( "#amount" ).val( currentSliderValue );
}
$( "#slider_1" ).slider({
min: 1000,
max: 5000,
step: 100,
slide: function( event, ui ) {
weightSliderValue = ui.value;
changeValue();
}
});
$( "#slider_2" ).slider({
min: 0.03,
max: 0.09,
step: 0.03,
slide: function( event, ui ) {
exerciseSliderValue = ui.value;
changeValue();
}
});
The result returns what I want, but the problem I have is that for the values of the second slider I want that as I move the slider I am shown other values than those I use to operate (in this case 0.03 - 0.06 - 0.09 respectively) and I do not know how to do it