How to add text inside a jquery Knob?

951 views Asked by At

This is my code where i am using data-prepend="abc" inside the input tag but it is not working. How can I add text inside the knob above percentage value?

<div class=" myknob2">
  <input type="text" value="33.33" class="dial2" data-thickness=".2" data-width="130" data-bgColor="#13430D">
  <script>
    $(function() {
      $(".dial2").knob({
        'format': function (value) {
          return value + '%';
        }
      });

      $('.dial2').trigger('configure', {
        "min": 0,
        "max": 100,
        "fgColor": "#228B22",
        "skin": "tron",
        "cursor": false,
        "inputColor": "#228B22"
      });
    });
  </script>
</div>
1

There are 1 answers

0
Soundar On BEST ANSWER

Based on your comments, I have achieved this using jQuery roundSlider plugin. Check the below demo:

DEMO

Hope this helps you..