jQuery를 처음 사용하고 테이블에 호버링 효과를주기 위해 노력하고 있지만 어떻게해야할지 모르겠다. 텍스트를 빨강으로 만들고 포커스를 잃어 버렸을 때 다시 붉은 색을 제거하는 방법을 원합니다.jQuery 호버 효과 표 위로
이것은 내가 지금까지 무엇을 가지고 : 당신이해야 할 모든 마우스 휴가를 위해 가져가 다른 기능을 통과
<script type="text/javascript">
$(function() {
$('tr').hover(function() {
$(this).css('color', 'red')
});
});
</script>
<table border="1">
<tr>
<th>ID</th>
<th>name</th>
</tr>
<tr>
<td>#1</td>
<td>ole</td>
</tr>
<tr>
<td>#2</td>
<td>jeffrey</td>
</tr>
<tr>
<td>#3</td>
<td>collin</td>
</tr>
<tr>
<td>#4</td>
<td>eve</td>
</tr>
</table>
코드가 완벽합니다.'.addClass'를 사용하십시오. – diEcho