ボタン セットがあり、各ボタンの幅を同じサイズに設定したい (つまり、各要素の 25% のボタンが 4 つある場合)
基本的にサイトの左側にテーブルがあり、そのテーブル内に 4 つのオプションがあります。今のままでは、左側の列を 100% 使用していないため、見栄えが悪くなります。ボタン セットが列の 100% を占有し、各ボタンが固定スペースの 25% を共有するようにしようとしています。
各ボタン要素を .css('width') にしようとしましたが、違いはありません。
私のコードは次のようになります。
<script type='text/javascript'>
$( function() { $("#task-sort").buttonset(); } );
</script>
<div id='task-sort'>
<input type='radio' name='task-sort' id='sort_all' checked><label for='sort_all'>All</label>
<input type='radio' name='task-sort' id='sort_inc'><label for='sort_inc'>Incomplete</label>
<input type='radio' name='task-sort' id='sort_com'><label for='sort_com'>Completed</label>
</div>