好的我没有运气试图将jQuery按钮组的复选框放在一起,而不是在选择时将默认的浅灰色变为白色,更改背景图像。我将从数据源输入标签文本,但这不是手头的问题。这些复选框将作为附加列表的过滤器。
提前致谢。
此处示例 http://jsfiddle.net/DEMfS/
<div id="format">
<input type="checkbox" id="check1" /><label for="check1">123</label>
<input type="checkbox" id="check2" /><label for="check2">456</label>
<input type="checkbox" id="check3" /><label for="check3">789</label>
</div>
<br/>The following are the unchecked state
<br/>
<img src="https://lh3.googleusercontent.com/-3X6UA9TV9xo/UPhQSxyLTSI/AAAAAAAAHaw/sxoZ23n2R_Y/w402-h234-n-k/btn_Green_UP.png" class="buttonsize" />
<img src="https://lh5.googleusercontent.com/-lVqOLbi_IHU/UPhQTqGuoAI/AAAAAAAAHbA/A7QB6Q9nQZ8/w503-h285-n-k/btn_Red_UP.png" class="buttonsize" />
<img src="https://lh4.googleusercontent.com/-mACV7V4RFSw/UPhQUeZe5mI/AAAAAAAAHbQ/Xr0T6Pn3o0g/w648-h378-n-k/btn_Yellow_UP.png" class="buttonsize" />
<br/>The following are the checked states
<br/>
<img src="https://lh6.googleusercontent.com/-G7D3v-IGixY/UPhQS0OSIGI/AAAAAAAAHa0/Tq9fME-VgI0/w830-h471-p-k/btn_Green_DOWN.png" class="buttonsize" />
<img src="https://lh6.googleusercontent.com/-6OJF3SrvAeo/UPhQTbYQ7II/AAAAAAAAHa8/x9WS5RvWH64/w408-h231-n-k/btn_Red_DOWN.png" class="buttonsize" />
<img src="https://lh4.googleusercontent.com/-1wwoWSnOZ8c/UPhQUWeasPI/AAAAAAAAHbY/RqX5U9WzCOk/w666-h378-n-k/btn_Yellow_DOWN.png" class="buttonsize" />