jQuery-Knob
jQuery-Knob copied to clipboard
Prefixing $ in format function
The format function works fine if you have to suffix anything like %, but if you prefix anything it breaks the code and you can no longer use mouse scroll to control the knob.
I used this:
$(".dial").knob({ 'min': 1 ,'max':500, format: function(v) { return "$" + v ; } });
Has there been any update here or were you able to find a work around?
Same issue here, can't find a way to make it work :( Did you by any chance ?
Same issue here.
format: function (value) {
if (type == '$') {
value = '$' + value.toLocaleString();
}
return value
};
Input: 30000 Output: $30,000
Cheers
I believe this is very similar to another issue I fixed, with commas in the formatted value. See pull request #318. You would just need to update the code I added to remove anything except numbers before parsing.