Jquery Knob animate and change color
Posted
by
user1468116
on Stack Overflow
See other posts from Stack Overflow
or by user1468116
Published on 2012-11-09T19:56:21Z
Indexed on
2012/11/09
23:00 UTC
Read the original article
Hit count: 800
jQuery
I'd like to create a knob that switch color at some point. For example, at 35 is red, at 70 is yellow and 100 is green.
I also would like to make it animate.
this is my fiddle: http://jsfiddle.net/Tropicalista/jUELj/6/
My code is:
enter code here
$(document).ready(function() {
$('.dial').val(13).trigger('change').delay(2000);
$(".dial").knob({
'min':0,
'max':100,
'readOnly': true,
'width': 120,
'height': 120,
'fgColor': '#b9e672',
'dynamicDraw': true,
'thickness': 0.2,
'tickColorizeValues': true,
'skin':'tron'
})
});
© Stack Overflow or respective owner