javascript - Get data-value of each individual div -


i'm using couple of plugins animate progress bars using javascript.

i'm setting data value of each 1 in html avoid defining in javascript each time.

<div class="progress-circle" data-value="0.65"> 

i want data value animate , stop @ value each time code have @ moment stops of them @ 1st divs value.

    var el = $('.progress-circle'),     inited = false;      el.appear({ force_process: true });      el.on('appear', function() {       if (!inited) {         el.circleprogress({ value: el.attr('data-value') });         inited = true;       }     });      $('.progress-circle').circleprogress({         size: 80,         startangle: -math.pi / 4 * 2,         linecap: "round",         fill: { color: "#64b46e" }      }).on('circle-animation-progress', function(event, progress, stepvalue) {     $(this).find('.inner').text(string(stepvalue.tofixed(2)).substr(2)+ '%'); }); 

how can use each divs unique data-value attribute?

$('your-div').each(function() {    //do $(this).data('value');    //other way $(this).attr('data-value'); }); 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -