I am using jquery knob knob on my site to create some nice visuals. I wish to change the color using a click event. I have provided a simplified fiddle of what I am trying to achieve. I have been trying for several hours and now have to ask for help
DEMO http://jsfiddle.net/JW2gP/62/
HTML
<input type='text' id='dial' value='0' />
<a id="chgColor" href="#">Change color on click</a>
jQuery
$(function () {
$('#dial').knob({
min: '0',
max: '25000',
fgColor: '#f00'
});
$('#dial').val(10927).trigger('change');
});
$('#chgColor').click(function(e){
e.preventDefault();
$('#dial').knob({
min: '0',
max: '25000',
fgColor: '#000'
});
});