Better than that..
I registered some globals, and with a simple if statement, they don't
allow overlapping animations,
and its much more reliable than I would have thought.
They are split so you can do a simultaneous open one close another
animation.

--

var animationUp = null;
var animationDown = null;

function show_module(pos)
{
    if(!animationDown)
    {
        animationDown = new Effect.BlindDown(
            pos,
            {
                duration: .5,
                afterFinish: function()
                {
                    animationDown = null;
                }
            }
        );
    }
    return false;
}

function hide_module(pos)
{
    if(!animationUp)
    {
        animationUp = new Effect.BlindUp(
            pos,
            {
                duration: .5,
                afterFinish: function()
                {
                    animationUp = null;
                }
            }
        );
    }
    return false;
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to