Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * HIGHLIGHT WHEN ONCLICK RADIO
- * ----------------------------------------------- */
- $(document).ready(function() {
- $(".table-description tr").on("click",function() {
- if($(this).find('input[type="radio"]').is(':checked')) {
- $('.table-description tr').removeClass('tr-highlight');
- $(this).addClass('tr-highlight');
- }
- });
- });
- <table class="table table-bordered table-gray table-description">
- <thead>
- <tr>
- <th>
- カラー/サイズ
- </th>
- <th>
- 在庫
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th>
- ブラック/Sサイズ
- </th>
- <td>
- <input type="radio" name="description">
- </td>
- </tr>
- <tr>
- <th>
- ブラック/Mサイズ
- </th>
- <td>
- <input type="radio" name="description">
- </td>
- </tr>
- </tbody>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement