http://jsfiddle.net/c6f7ommh/1 - Saw the example with div containers, but want to know if its possible to resolve with input
$(document).ready (function() {
var minNumber = 0;
var maxNumber = 100;
$('.txtinput').on("change", function() {
var inputVal = parseFloat($(this).val().replace(' %', ' ')) || 0
if (minNumber > inputVal) {
inputVal = 0;
} else if (maxNumber < inputVal) {
inputVal = 100;
}
$(this).val(inputVal + ' %');
});
});
That is what I've made for now, but I'm very new to programming, so if you can provide some tips on how to complete it, would be awsome!