[Seaside] Scriptaculous -- combinaison of effects

Lukas Renggli renggli at gmail.com
Wed Apr 5 15:51:05 UTC 2006


> But I want something more spectacular :) like
> a puff effect foolowed by an appear effect for example.

You can chain effects like:

html div
	id: 'test'
	onClick: (html effect
		id: 'test';
		puff;
		onAfterFinish: (html effect
			id: 'test';
			appear));
	with: 'Foo Bar'

Or you could also use the effect queues and do something like (but I
never really tried this):

html div
	id: 'test';
	onClick: (html effect id: 'test'; queueEnd; puff);
	onClick: (html effect id: 'test'; queueEnd; appear);
	with: 'Foo Bar'

> It seems that only one effect can be execute during an OnClick event
> or am I wrong ?

Yes, you can execute an arbitrary number of effects in parallel:

html div
	id: 'test';
	onClick: (html effect id: 'test'; puff);
	onClick: (html effect id: 'test'; highlight);
	with: 'Foo Bar'

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


More information about the Seaside mailing list