开发者

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) ]

[ Butto开发者_如何学Gon A (Disabled) ] 
[ Button B (Disabled) ]
[ Button C (Enabled)  ]


jQuery UI has a radio button. Demo here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜