I'm using a jquery knob plugin. I want to make the knob readonly on button click.
(function() {
$(".dial").knob({
'min':0,
'max':360,
'change' : function(degree){
var img = $(".volume_bttn");
if(radioSwitchState == 1)
{
img.css('-moz-transform', 'rotate('+degree+'deg)');
img.css('-webkit-transform', 'rotate('+degree+'deg)');
img.css('-o-transform', 'rotate('+degree+'deg)');
img.css('-ms-transform', 'rotate('+degree+'deg)');
var vol = ((degree)/360).toFixed(2);
//console.log(vol);
$("#jquery_jplayer_1").jPlayer("volume",(360-vol));
}
},
'fgColor' : '#460E09',//460E09
'bgColor' : "transparent",//transparent
'width' : 107,
'thickness' : 0.3,
'displayInput' : false,
'linecap' : 'butt'
});
});
This is a code where I'm initializing the knob. How to make it readonly on button click?(I repeat)
From the jQuery Knob Documentation:
So you would end up with something like this: