Function Slider Test
by nwellcome
HTML
<input type="range" name="input" id="input" min="0" max="100" value="0">
<br>
<input type="range" name="output" id="output" min="0" max="100" value="0">
CSS
input {
width:100%
}
JavaScript
var selected = false;
$("#input").mousedown(function() {
selected = true;
});
$("#input").mouseup(function() {
selected = false;
});
$("body").mousemove(function() {
if (selected) {
$("#output").val(
y($("#input").val())
);
}
});
function y(x) {
return Math.pow(x, 1.25);
}