2013-09-23 26 views

回答

5
$("input.Measure").knob({ 
     min: 1 
     max: 10 
     stopper: true, 
     readOnly: false,//if true This will Set the Knob readonly cannot click 
     draw: function() { 
      $(this.i).val(this.cv + '%') //Puts a percent after values 
     }, 
     release: function (value) { 
     //Do something as you release the mouse 
    } 
}); 
+0

我已經使用這個爲只讀旋鈕 - 似乎在最初的工作加載,但頁面重新加載時不繪製圖形指示符。 – winwaed

+0

查看http://stackoverflow.com/questions/21443055/overriding-units-on-a-jquery-knob-does-not-redraw-correctly-on-page-reload/21461423#21461423獲取各種重繪的解決方案上面的代碼有問題。 – winwaed