Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    function design at fault ?

    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..

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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().
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •