I have this bar percentage and wanted to dynamically change the value of it just that I am not getting it.
Barcode
<script>$('.bar-percentage[data-percentage]').each(function(){varprogress=$(this);varpercentage=Math.ceil($(this).attr('data-percentage'));$({countNum:0}).animate({countNum:percentage},{duration:2000,easing:'linear',step:function(){//Whattodooneverycountvarpct=Math.floor(this.countNum)+'%';progress.text(pct)&&progress.siblings().children().css('width',pct);}});});</script><divid="bar-5" class="bar-main-container">
<div class="bar-percentage" data-percentage="51"></div>
<div class="bar-container">
<div class="bar"></div>
</div>
</div>
Code that I used to try to change Dynamically
<script>
$('.bar-percentage').attr('data-percentage','60')//irá receber um valor diferente depois de efectuar cálculos
</script>