aterrien/jQuery-Knob

Can I use an array of values?

tracs opened this issue · 1 comments

tracs commented

Can I use an array of values on my knob?
Like: 20,30,60,100,200,400,800

tracs commented

Solved by:

var values = [20, 30, 60, 100, 200, 400, 800];

$(".foo").knob({
min: 0,
max: values.length - 1,
step: 1,
format: function(v) {
return values[v];
}
});