私は Jquery ノブ ( http://anthonyterrien.com/knob/ ) を使用していますが、うまく機能しますが、中間に無次元の数値を表示するのではなく、ei % や F などの単位を表示したいと思います...どのように私はこれを行うことができますか?
4626 次
2 に答える
6
$("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
}
});
于 2013-10-08T09:18:35.320 に答える
2
Benが「 jquery ノブの入力値にパーセンテージを追加する」について説明しているように、最近のバージョン (>1.2.7) では、次の format フックを使用できます。
$(".dial").knob({
'format' : function (value) {
return value + '%';
}
});
于 2016-10-09T17:39:45.680 に答える