Here is the current code, using pixels. It animates just fine.
fontSize: $('span.heart').css('fontSize') == '150px' ? '50px' : '150px'}, 500, animateHeart);
I tried using ems like this. But the animation does not work.
fontSize: $('span.heart').css('fontSize') == '2em' ? '1em' : '2em'}, 500, animateHeart);
http://codepen.io/jessecfisher/pen/HcdiL
Thanks!
Inspect the heartbeat element on Chrome and you will see the font is changing but only after 2 so it is changing like:
2.02012414, 2.12412412 etc
This might be where your problem lies
Here is the current code, using pixels. It animates just fine.
I tried using ems like this. But the animation does not work.
http://codepen.io/jessecfisher/pen/HcdiL
Thanks!
Inspect the heartbeat element on Chrome and you will see the font is changing but only after 2 so it is changing like:
2.02012414, 2.12412412 etc
This might be where your problem lies