JQuery Knob display number change

后端 未结 3 855
终归单人心
终归单人心 2020-12-30 15:23

I\'m using JQuery Knob to make some cool graphs and it\'s working perfectly. But I have one problem: I want to make the display number between the graph have a \'%\' symbol

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 15:39

    As of version 1.2.7 there is now a format hook for performing tasks like this:

    $(".dial").knob({
      'format' : function (value) {
         return value + '%';
      }
    });
    

提交回复
热议问题