Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] [OT] Looking for Javascript 3-toggle button



On Mon, 15 Feb 2010 00:52:29 +0900, Dave M G <dave@example.com> wrote:

> Any idea what's missing?

Yep. You're resetting the array containing the backgrounds every time you
click on the button.

Move the declaration of that array out of the function and into the main
body of the javascript (which is what I gave you to start with).

Also make the first element of the array the yellow background, not the
green one (which is also what I gave you to start with). Otherwise, the
first time you click on the button, the "new" colour will be green, which
is what you already have initially.

-- 
G. Stewart - gstewart@example.com

QUARK:
        The sound made by a well-bred duck:

Attachment: pgpAMRFKXDsyJ.pgp
Description: PGP signature


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links