var t = [];
$('.igs').each(function(index, item){
var that = $(this);
var normal = Number(that.text());
var number = Number(that.attr('data-number'));
var step = Number(that.attr('data-step')) || 1;
var interval = Number(that.attr('data-speed')) || 50;
function flash(){
normal += step;
if(normal > number){
that.text(number);
clearInterval(t[index]);
}else{
that.text(normal);
}
}
t[index] = setInterval(flash, interval);
})