<div class="donut donut-big"> <div class="donut-arrow" data-percentage="10"></div> </div> <div class="donut"> <div class="donut-arrow" data-percentage="30"></div> </div> <div class="donut donut"> <div class="donut-arrow" data-percentage="60"></div> </div> <div class="donut donut-small"> <div class="donut-arrow" data-percentage="90"></div> </div>
$('#myButton').on('click', function () { $('#myDonut').find('.donut-arrow').trigger('updatePercentage', Math.floor((Math.random()*100))) });