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
I managed to achieve this with animation too:
My solutions does this by adding the percentage each time the value gets increased:
$(function() {
$('.dial_overall').each(function () {
var $this = $(this);
var myVal = $this.attr("value");
$this.knob({
});
$({
value: 0
}).animate({
value: myVal
}, {
duration: 1600,
easing: 'swing',
step: function () {
$this.val(Math.ceil(this.value)).trigger('change');
$('.dial_overall').val($('.dial_overall').val() + '%');
}
})
});
});