jQuery knob tron skin问题

如果有人之前使用过这个插件:

https://github.com/aterrien/jQuery-Knob

我试图涂抹皮肤:“tron”

试图添加但是没有用,也尝试了初始化代码:

 $(".dial").knob({ readOnly:true, thickness:0.05, width:100, fgColor:"#cc0000", bgColor:"#ccc", skin:"tron" }); 

谁知道什么可能是错的?

以防万一有人正在寻找相同的答案,应该尝试这个,在演示页面中找到,不要为什么这样的代码不包含在源脚本中虽然!

在旋钮方法中包含此选项:

 draw : function () { // "tron" case if(this.$.data('skin') == 'tron') { this.cursorExt = 0.3; var a = this.arc(this.cv) // Arc , pa // Previous arc , r = 1; this.g.lineWidth = this.lineWidth; if (this.o.displayPrevious) { pa = this.arc(this.v); this.g.beginPath(); this.g.strokeStyle = this.pColor; this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, pa.s, pa.e, pa.d); this.g.stroke(); } this.g.beginPath(); this.g.strokeStyle = r ? this.o.fgColor : this.fgColor ; this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, as, ae, ad); this.g.stroke(); this.g.lineWidth = 2; this.g.beginPath(); this.g.strokeStyle = this.o.fgColor; this.g.arc( this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false); this.g.stroke(); return false; } } 

即使是一个非常晚的答案,你可以使用jQuery roundSlider插件,你可以通过简单的CSS自定义来实现tron皮肤。

查看以下演示:

Demo - JSFiddle

截图: 带有tron皮肤的JavaScript roundSlider插件