Mailing List Archive


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

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



TLUG,

I think I must be using the wrong terminology, because I can't believe
this wheel has not been invented before.

I'm looking for a Javascript button to put into an HTML page that
toggles between three states.

For example, say the button starts out green. You click it once, and it
turns yellow. Click it again, it turns red. Click it once more, and it
goes back to green.

I've tried searching for "toggle three times", "button with three
states", "button that cycles different states", and a few other
variations, and I've come up with nothing.

Actually, that's not totally true. Part of the problem is that often
times pages I've come across use "three states" to refer to a button
that responds to mouse-over events. So the three states are static,
mouse over, and pressed. That's not what I'm after. The three states I
want to toggle are all in response to the button being pushed.

This confusion of terms is probably crowding out what I'm looking for.

Anyone come across anything like that or know where to look? Or maybe
just know the right terminology for what I mean?

Ideally I'd like something using either Jquery or YUI, as I'm already
implementing those libraries. YUI has something close, but it's based on
HTML check boxes, which only allows two states (as far as I can tell):

http://developer.yahoo.com/yui/examples/button/btn_example03.html

Any help would be much appreciated.

Thank you.

-- 
Dave M G


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links