<div class="113" >
<label class="checkbox-inline">
<input type="radio" name="p01_1" />1
</label>
<br />
<label class="checkbox-inline">
<input type="radio" name="p01_1" />2
</label>
<br />
<label class="checkbox-inline">
<input type="radio" name="p01_1" />3
</label>
<br />
<label class="checkbox-inline">
<input type="radio" name="p01_1"/>4
</label>
</div>
<div class="114" >
<label class="checkbox-inline">
<input type="checkbox" name="p01_1" />1
</label>
<br />
<label class="checkbox-inline">
<input type="checkbox" name="p01_1" />2
</label>
<br />
<label class="checkbox-inline">
<input type="checkbox" name="p01_1" />3
</label>
<br />
<label class="checkbox-inline">
<input type="checkbox" name="p01_1"/>4
</label>
</div>
$("input[name^=" p01_1 "]").each(function() {
$(this).css("z-index", -1); //隐藏自带的选项框
$(this).css("opacity", 0.01);
if ($(this).attr("checked") == "checked") {
$(this).parent().addClass("selected");
$(this).parent().removeClass("select");
} else {
$(this).parent().addClass("select");
$(this).parent().removeClass("selected");
}
});