CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.
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);
This reply has been reported for inappropriate content.
Inspect the heartbeat element on Chrome and you will see the font is changing but only after 2 so it is changing like:
This might be where your problem lies
You must be logged in to reply to this topic.
Search for Stuff
Browse the Archives
Get the Newsletter
... or get the RSS feed