$(".progressbar").each(function(){ $(this).progressbar({ value: Math.floor($(this).data('progress-max')/$(this).data('progress-value')); }); });