views:

21

answers:

1

I have a selection of elements in a jQuery object. I want to animate their font sizes, but as I have both the headlines and various paragraphs in the selection, they should be animated slightly differently, as the headlines should end up with a larger font size than the paragraphs. I already have this information stored in the jQuery data cache.

I can do that. But, not unless I use several calls to the animate function, one for each specific, slightly different animation, perhaps using event triggering or setTimeout() calls.

Of course I want to avoid this, as it's damn ugly and an odd way around. Much prettier if it could be done internally, within the animation ...

Any help would be much appreciated.

+1  A: 

You can animate an increase in fontSize:

$(...).animate({ fontSize: '+=8' });
SLaks
I'm feeling so damn stupid right now :D. *Of course* that works, and I have just commented on another post where I recommended incrementation ... Awkward. But, hey, thanks a lot :). Even though you didn't actually answer the question, but you did solve my problem :D
Sune Rasmussen