サンプルコードhttp://jsfiddle.net/ESDUD/を参照してください
HTML
<input type='text' id='abc'>
<br>
NIGHT <div id="radio">
<input type='radio' name='myradio1' id='final' value='1'/>
<label for="final" title='FINAL'>FINAL</label>
<input type='radio' name='myradio1' id='maybe' value='2'/>
<label for="maybe" title='MAYBE'>MAYBE</label>
<input type='radio' id='noways' name='myradio1' value='3' checked="checked" />
<label for="noways" title='NO WAYS'>No WAYS</label>
</div>
DAY <div id="radio2">
<input type='radio' name='myradio2' id='final2' value='1' checked="checked" />
<label for="final2" title='FINAL'>FINAL</label>
<input type='radio' name='myradio2' id='maybe2' value='2'/>
<label for="maybe2" title='MAYBE'>MAYBE</label>
<input type='radio' id='noways2' name='myradio2' value='3' />
<label for="noways2" title='NO WAYS'>No WAYS</label>
</div>
JS
$("#radio").buttonset();
$("#radio2").buttonset();
ものすごく単純....
しかし、最初に値を入力してtextbox
Enter キーを押すと、ラジオ セットにフォーカスが移動しますが、矢印キーを押して選択オプションが変更されるまで、ユーザーはそれを理解できません。
いくつかの CSS を変更radio set
してフォーカスを強調表示するために、次の CSS を試しました
#radio2 label:focus{
color: red;
border: 1px solid black;
}
#radio label:focus{
color: red;
border: 1px solid black;
}
しかし、それは効果がありません。
私の単純な要件は、textbox
がぼやけているときに、ある種の強調表示または CSS の変更 (親にある場合でもDIV
) をユーザーに表示して、ユーザーが現在radio set
アクティブな入力であることを知ることができるようにすることです。