I have piece of code showing radial bar as in this minimal working example:
http://codepen.io/shankarcabus/pen/GzAfb
I would like to insert several divs with this code, but the JS script remembers only the first value and places them everywhere where "percent" is used. Is there any nice, clean way to fix bar value in multiple cases?
JS code:
$(function(){
var $ppc = $('.progress-pie-chart'),
percent = parseInt($ppc.data('percent')),
deg = 360*percent/100;
if (percent > 50) {
$ppc.addClass('gt-50');
}
$('.ppc-progress-fill').css('transform','rotate('+ deg +'deg)');
$('.ppc-percents span').html(percent+'%');
});