Hello want to make a image with a heartbeat effect. 2 quick pulses and then 2 seconds break, 2 quick pulses and then 2 seconds break. I want to put it in a div, if possible to centralize the scaling anchor...
Here is what I have now:
(function pulse(back) {
$('#seventyfive img').animate(
{
width: (back) ? $('#seventyfive img').width() + 20 : $('#seventyfive img').width() - 20
}
, 700);
$('#seventyfive').animate(
{
'font-size': (back) ? '100px' : '140px',
opacity: (back) ? 1 : 0.5
}
, 700, function(){pulse(!back)});
})(false);
Or you can check this JSFiddle