I have input sliders (see jsfiddle) that on change i'd like to loop through their values and get a total.
I wrote the code I thought would do this, but i failed, see the fiddle and thank you so much in advance!
Percentage Sliders<br><br>
<input type="tex" class="slida" type="text" data-slider="true" data-slider-range="0,100" data-slider-step="25" data-slider-snap="true" data-slider-theme="volume" >
<br><br>
<input type="tex" class="slida" type="text" data-slider="true" data-slider-range="0,100" data-slider-step="25" data-slider-snap="true" data-slider-theme="volume" >
$(".slida").bind("slider:changed", function (event, data) {
console.log("Changed Value: ", data.value);
$(this).each(function() {
total = 0;
$(this).each(function() {
total += parseInt( $(this).val() );
});
});
console.log("TOTAL: ", total)
});
// end