PDA

View Full Version : function design at fault ?


WilliamNz
04-13-2007, 08:10 AM
Hi there, I am using scriptilicious and can generate effects when using:

<div id="boosters"onclick="new Effect.Opacity(sampleBox5, {duration:3, from:.1, to:1.0})">

However, I want to be able to change the opacity of many divs onClick. So I have tried to use a function:


<div id="boosters"onclick="go()">


function go() {
new Effect.Opacity(sampleBox5, {duration:3, from:.1, to:1.0});
new Effect.Opacity(sampleBox4, {duration:3, from:.1, to:1.0});
}

When using functions, none of the effects work..

_Aerospace_Eng_
04-13-2007, 09:07 AM
Have you tried naming your function to something other than go? I think go() is already a function when it comes to the history.go().