javascript - How to make jquery knob readonly using jquery? -


i'm using jquery knob plugin. want make 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 code i'm initializing knob. how make readonly on button click?(i repeat)

from jquery knob documentation:

$('.dial').trigger(     'configure',     {         "min":10,         "max":40,         "fgcolor":"#ff0000",         "skin":"tron",         "cursor":true     } ); 

so end this:

$('.button').click(function() {     $('.dial').trigger('configure', {"readonly": true}); } 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -