Bind と Unbind Please を使いたいです。複数の行を持つテーブルがあります。各行にラジオボタンがあります。HTML を実行すると、各行にカーソルを合わせると、各行が水色に変わります。ラジオ ボタンを選択すると、選択していない他の行にカーソルを合わせることができなくなります。私を助けてください
<table id ="myTable">
<tr>
<th>Selected</th>
<th>First Name</th>
<th>Middle Name</th>
<th style="width: 10%;">Last Name</th>
<th>Active Email</th>
<tr>
<td><input class ="rad" type="radio" name="developerRadio" value="Value 1" /></td>
<td>Hello</td>
<td>everyone</td>
<td>good</td>
<td>email</td>
<td>hello</td>
</tr>
<tr>
<td><input class ="rad" type="radio" name="developerRadio" value="Value 1" /></td>
<td>Hello</td>
<td>everyone</td>
<td>good</td>
<td>email</td>
<td>hello</td>
</tr>
<tr>
<td><input class ="rad" type="radio" name="developerRadio" value="Value 1" /></td>
<td>Hello</td>
<td>everyone</td>
<td>good</td>
<td>email</td>
<td>hello</td>
</tr>
<script>
$(document).ready(function () {
$("tr").mouseover(function () {
$(this).css("background-color", "#0066FF");
});
$("tr").mouseout(function () {
$(this).css("background-color", "");
});
$('input:radio').click(function () {
$("tr").unbind("mouseover mouseout");
$(this)
.closest('tr')
.siblings()
.css('background-color', 'white')
.end()
.css('background-color', 'darkblue');
$("input:radio")
.unbind("click")
.click(function () {
$('tr').bind("mouseover");
$(this).closest('tr').css('background-color', "#0066FF");
});
});
});
</script>