View Single Post
03-01-2008, 02:46 PM
#5
Wildhoney is offline Wildhoney
Wildhoney's Avatar
Status: Request a custom title
Join date: Feb 2006
Location: Nottingham
Expertise:
Software:
 
Posts: 1,648
iTrader: 18 / 95%
 

Wildhoney is on a distinguished road

Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney

  Old

You'll want to set a variable that prevents the latter trigger from being triggered until the former trigger has completed. In Prototype you could do something like the following:

Code:
var bTrigger = true;

if(bTrigger == true)
{
	bTrigger = false;

	pEvent = 
	{
		afterFinish: function()
		{
			bTrigger = true;
		}
	}

	new Effect.Shake($('myElement'), pEvent);
}