Eric
unread,Aug 20, 2008, 11:08:27 AM8/20/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ojay talk
On the site, you can easily change the duration of an animation based
on the element's position in the array:
Ojay('li').animate({marginTop: {to: 40}},
function(i) { return 0.5 * (i+1); });
For a cascading effect, I like to keep the same duration, but add a
delay. My impression has been that for several methods, the parameter
is "lamda'd" so that I can either use a function to return a value (as
seen above), or pass in a value direction. This is what I'm
attempting to use, but I don't believe the "wait" method is equipped
for such a task:
$('li').wait(function(i) { return i }).animate({ left: { to: 20 } },
0.5);
Basically, for each tab, there is an n-second delay prior to the 500ms
animation. As you can tell, I'm kicking the tires on Ojay to see what
can truly be chained and what has to be placed in a loop.