jquery bootstrapのiCheckでflat指定したradioボタンを選択する方法
はまったのでメモ。
html
<div> <label> <input type="radio" class="flat" name="radio" value="0" />チェック1 </label> <label> <input type="radio" class="flat" name="radio" value="1" />チェック2 </label> </div>
$(function(){ // ↓flat指定ありの場合 $("div").find('input').eq(0).iCheck('check'); // ↓flatを使わない通常の選択方法 //$("div").find('input').eq(0).prop('checked',true); });
ポイントはiCheck()を使うこと。
Checkboxes and radio buttons customization (jQuery and Zepto) plugin