jQuery-Knob
jQuery-Knob copied to clipboard
Change max on the fly.
Hello
I want to use this for a media player, the media player will play different tracks with different values, so it's useful to change the max value on the fly too.
Please advise. Regards
User trigger('configure') followed by trigger('change'); following example sets new maximum value to 10000 and ask for knob redraw;
$('#some-knob-element-id').trigger('configure', {
'max': 10000;
});
$('#some-knob-element-id').trigger('change');
Confirmed working solution but you need to remove the ';' after the 'max' value
I'm using this exact code to (minus the unneeded ';') and the new maximum value is placed on top of the existing max value - so you have two pieces of text on top of each other, completely unreadable. Just wondering how to solve that?