Scriptaculous -- combinaison of effects

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Scriptaculous -- combinaison of effects

Gaetan Le Brun
Hello,
 
I try to do a combinaison of effects when I click on a div.
 
I have the following code.
html div id: 'test';
   onClick: (html effect id: 'test'; perform: #highlight);
   with: 'test'
 
But I want something more spectacular :) like
a puff effect foolowed by an appear effect for example.
 
It seems that only one effect can be execute during an OnClick event
or am I wrong ?

Thanks in advance,
Sincerely,
Gaetan

IFSIC - Rennes - France

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous -- combinaison of effects

Lukas Renggli
> 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
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside