简体   繁体   中英

How to change text inside JQuery knob

I want to change the text of JQuery Knob. For example I have a rate 23% consumed I want to put 23% on row and consumed in new row inside the circle. In other word, I want to add (consumed) under the percentage in different style (The font size of rate 16px and consumed 12px)

Add This to your knob options

format : function (value) {
    return value + '%';
}

if you display % in your knob slider :

change line format:function(v){return v} to format:function(v){return v + "%"}

above line must be in jquery.knob.min.js

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM