jquery에서 테이블에 마우스 오버시 해당 행의 배경색상 변경하기
페이지 정보
작성자 YJNet 작성일14-10-22 11:49 조회19,481회 댓글0건본문
jquery에서 테이블(표)에 마우스 오버시 해당 행(TR)의 배경색상을 변경하는 방법입니다.
<script>
$(document).ready(function(){
$('table tr').mouseover(function(){
$(this).css("backgroundColor","#ccc");
});
$('table tr').mouseout(function(){
$(this).css("backgroundColor","#fff");
});
});
</script>
$(this).css("backgroundColor","#ccc");
});
$('table tr').mouseout(function(){
$(this).css("backgroundColor","#fff");
});
});
</script>
댓글목록
등록된 댓글이 없습니다.