var c=0 var t $foo = $('#foo') function timedCount() { $foo.html(c) c=c+1 $foo.addClass('big') $foo.on('transitionend', function (e){ var style = getComputedStyle(e.target) } }, 500) } $('#btn').on('click',function(){ timedCount() })