I use the jquery knob on my site to create nice visual effects. I want to change color using click event. I have provided a simplified script of what I am trying to achieve. I tried a few hours and now I 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'
});
});
user1320260
source
share