[ 6 posts ]

StuPlum

  • Username: veearrsix
  • Joined: Wed Feb 11, 2009 1:51 am
  • Posts: 4
  • Offline
  • Profile

Chained Animations on Different Elements

Post Posted: Fri Feb 20, 2009 4:33 am
+0-
I'm looking to create an effect whereby a list of information can be deleted on a mouse click.

Before I dive into coding I wanted to see if there was a recommended way of chaining animations on different elements. For example i'm using an unordered list <ul>, and on a mouseclick I want each <li> element to blind up and fade. The individual effects on each element I know how to handle, however I haven't come across any documentation for firing the animation on the next <li> element after its previous sibling has finished animating.

Initially I thought of subscribing to the onComplete event selectively using a forloop, but this seems very clunky. ie, iterate through each <li> element in the unordered list craeting the animation, executing the animation and (providing the <li> isn't the last one in the list), subscribing to the onComplete event and asigning a new animation to the next element in the list. (sorry if that sounds a bit confusing!)

Has anyone had to do something similar before?

K o v a c s

  • Username: Kovacs
  • Joined: Wed Feb 11, 2009 8:55 am
  • Posts: 100
  • Location: The Biggest Little City in the World
  • Offline
  • Profile
Tags:

Re: Chained Animations on Different Elements

Post Posted: Fri Feb 20, 2009 10:18 am
+0-
Maybe this example will help:

http://developer.yahoo.com/yui/examples ... ning.html#

K o v a c s

  • Username: Kovacs
  • Joined: Wed Feb 11, 2009 8:55 am
  • Posts: 100
  • Location: The Biggest Little City in the World
  • Offline
  • Profile
Tags:

Re: Chained Animations on Different Elements

Post Posted: Fri Feb 20, 2009 10:22 am
+0-
And these examples from Dav's website:

http://blog.davglass.com/files/yui/animagain/

and

http://blog.davglass.com/files/yui/animseq/

K o v a c s

  • Username: Kovacs
  • Joined: Wed Feb 11, 2009 8:55 am
  • Posts: 100
  • Location: The Biggest Little City in the World
  • Offline
  • Profile
Tags:

Re: Chained Animations on Different Elements

Post Posted: Fri Feb 20, 2009 10:25 am
+0-
How about this one?

http://onlinetools.org/tools/yuidomcollapse/

(That's enough examples, eh?)

Eric Miraglia

YUI Contributor

  • Username: miraglia
  • Joined: Tue Sep 02, 2008 10:59 am
  • Posts: 205
  • Location: Los Gatos, CA
  • Twitter: miraglia
  • GitHub: miraglia
  • Gists: miraglia
  • Offline
  • Profile

Re: Chained Animations on Different Elements

Post Posted: Fri Feb 20, 2009 11:37 am
+0-
Stuart,

Here's an example that does something similar to what you're asking:

http://ericmiraglia.com/yui/demos/lianim.php

-Eric

StuPlum

  • Username: veearrsix
  • Joined: Wed Feb 11, 2009 1:51 am
  • Posts: 4
  • Offline
  • Profile

Re: Chained Animations on Different Elements

Post Posted: Mon Feb 23, 2009 1:46 am
+0-
Thanks Eric, thats exactly what I was looking for =0)
  [ 6 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum