JQuery UI 对象按钮栏的工作方式类似于单选按钮
我想在 jQuery 中制作一个控件或使用一个控件,其作用类似于一系列单选按钮,但看起来像实心按钮而不是单选圆。它们看起来像一个水平菜单,但一次只能选择一个。
I'd like to make a control or use a control in jQuery that acts like a series of radio buttons but that looks like solid buttons instead of the radio circle. They'd look like a horizontal menu but only one could be selected at one time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
jQuery UI 在 1.8 中为此添加了一个小部件,请查看 jQuery UI 按钮。
标记看起来像这样(直接来自演示),只需使用像
这样的容器:
然后调用
.buttonset()
:jQuery UI added a widget for this in 1.8, check out jQuery UI Buttons.
The markup looks like this (straight from the demo), just use a container like a
<div>
:Then call
.buttonset()
: