I need select value of radio, when I click on button.
This is my code. jquery code must start with this code:
$('.button').click(function(){});
I wrote this code but it not work:
$('.button').click(function(){
var t = $(this).parent().find('td div#select_type').children('input[checked=checked]').html(); });
<table>
<tbody>
<tr class="row">
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td width="130">
<div id="select_type">
<input value="0" id="select_type_0" type="radio" name="select_type" />
<label for="select_type_0"></label>
<input value="1" id="select_type_1" type="radio" name="select_type" />
<label for="select_type_1"></label>
<input value="2" id="select_type_2" type="radio" name="select_type" checked=checked />
<label for="select_type_2"></label>
</div>
</td>
<td class="button button_bt" style=" border: none">
<a>button</a>
</td>
</tr>
<tr>
...
</tr>
</tbody>
</table>