jQuery按钮集图像
是否可以使用jQuery buttonset()将图像作为背景 我尝试了这个标记,但设计出了问题:jQuery按钮集图像,jquery,jquery-ui,radio-button,Jquery,Jquery Ui,Radio Button,是否可以使用jQuery buttonset()将图像作为背景 我尝试了这个标记,但设计出了问题: <input type="radio" id="radio1" name="radio" /> <label for="radio1" id="lbl1"> <img src="images/red.png" /> </label> <input type="radio" id="radio2"
<input type="radio" id="radio1" name="radio" />
<label for="radio1" id="lbl1">
<img src="images/red.png" />
</label>
<input type="radio" id="radio2" name="radio" checked="checked" />
<label for="radio2">
<img src="images/blue.png" />
</label>
<input type="radio" id="radio3" name="radio" />
<label for="radio3">
<img src="images/orange.png" />
</label>
我在谷歌上搜索插件,但没有找到我需要的
有人试过吗?你可以检查这把小提琴: 它使用jQueryUI按钮集,可轻松定制:
$( "#radio" ).buttonset();
$($('.ui-button')[0]).addClass('bgcolor-red');
$($('.ui-button')[2]).addClass('bgcolor-black');
很抱歉延迟回复。谢谢,这看起来像是我需要的,但我得到了上面的“未捕获的SyntaxError:意外令牌非法”。