*** EDIT: solution found. Adding the necessary content for future users who are faced with this.
I am completely fixated on why my JS can make this widget count by single integers, but when it counts it, it’s as if it combines the “1” at the end of my window.
You may notice this right away:
markup here:
<input type="text" name="volume" id="delta" class="change" value="50" />
<input id="slider" type="range" min="0" max="100" step=".2" value="50" />
js here:
var timeout, tabMinus = $('#minus'), tabPlus = $('#plus');
$('#slider').mouseup(function() {
$('#delta').val($('#slider').val());
});
$('#delta').keyup(function() {
$('#slider').val($('#delta').val());
});
tabMinus.mouseup(function() {
$('#delta').val($('#slider').val() - 1);
$('#slider').val($('#delta').val() - .2);
});
tabPlus.mouseup(function() {
$('#delta').val($('#slider').val() + 1);
$('#slider').val($('#delta').val() + .2);
console.log($('#delta').val());
});
Also, bonus points, if there is a way to see LIVE updates when dragging the scroller, and not replay with the mouse.
Here is the fiddle:
https://jsfiddle.net/jnurbina/rvf8j6te/1/
Jason source
share