Mark Richman
Mark Richman

Reputation: 29710

jQuery Multiple State Toggle

I have three button images, each with three states (Enabled, Hover, Disabled), so a total of 9 images. These three buttons are mutually exclusive. So, clicking button A will disable buttons B & C. Is there an easy way to do this in jQuery, or do I have to manually show()/hide() the various combinations on click of each image?

[ Button A (Enabled)  ] 
[ Button B (Disabled) ]
[ Button C (Disabled) ]

[ Button A (Disabled) ] 
[ Button B (Enabled)  ]
[ Button C (Disabled) ]

[ Button A (Disabled) ] 
[ Button B (Disabled) ]
[ Button C (Enabled)  ]

Upvotes: 0

Views: 2314

Answers (1)

Pekka
Pekka

Reputation: 449485

jQuery UI has a radio button. Demo here.

Upvotes: 2

Related Questions