How to change font size in jQuery pen

I have a problem in jQuery Knob plugin. I want to change the font size inside the circle and change the contents of the input text.

+4
source share
1 answer

The only way I can do this neatly is to connect a function drawand use the property ito set the input style. For example, one CSS property is used here to rotate an input element and set the font size.

$(".dial").knob({
    'min':-50,
    'max':50,
    'draw': function() {
        $(this.i).css('transform', 'rotate(180deg)').css('font-size', '10pt');
      }
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://anthonyterrien.com/js/jquery.knob.js"></script>
<input type="text" class="dial" data-min="-50" data-max="50" />
Run codeHide result
+7
source

All Articles