[Pro] scriptaculous onclick for two items

Can I make two items transform from a single click?

 onclick="new Effect.toggle('mydiv', 'Slide', {duration:1, delay:0, queue:'end'})"

can the onclick transform a second item at the same time (same click)?

If so how should the code be formatted?


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The easiest way I can think of is to either stack the events on the
single onclick or create a single function that does both effects.
For example;
onclick=“new Effect.toggle(‘mydiv’, ‘Slide’, {duration:1, delay:0,
queue:‘end’}); new Effect.toggle(‘anotherdiv’, ‘Fade’, {duration:2,
delay:0, queue:‘end’})”
or;
wrap them both up in a single function and add this to the head of the
document;
function myfunction() {
new Effect.toggle(‘mydiv’, ‘Slide’, {duration:1, delay:0, queue:‘end’})
new Effect.toggle(‘anotherdiv’, ‘Fade’, {duration:2, delay:0,
queue:‘end’})
}
and then call this function on your onclick handler;
onclick=“myfunction()”

Regards,
Tim.

On 31 Oct 2009, at 19:58, WebWorker wrote:

Can I make two items transform from a single click?

onclick="new Effect.toggle('mydiv', 'Slide', {duration:1, delay: 

0, queue:‘end’})"

can the onclick transform a second item at the same time (same click)?

If so how should the code be formatted?

FreewayActions.com - Freeware and shareware actions for Freeway
Express & Pro.

Protect your mailto links from being harvested by spambots with Anti
Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks I’ll give it a go.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options