Can jQuery animate() behave differently for specific elements within my selection?

Posted by Sune Rasmussen on Stack Overflow See other posts from Stack Overflow or by Sune Rasmussen
Published on 2010-04-01T17:49:34Z Indexed on 2010/04/01 17:53 UTC
Read the original article Hit count: 285

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.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-animation