<div id="el">el</div>
<span id="progressbar" maxprogress="1000">0</span>%
var cc = 0;
$('#el').click(function(){
progressbar = $('#progressbar');
cc++;
max = Number(progressbar.attr('maxprogress'))
if(cc <= max){
procent = Math.ceil((cc/max) * 100)
progressbar.text(procent)
} else {
alert('progressbar complete')
}
})