1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 15:19:06 +00:00

highlight the tr when mouse hover

This commit is contained in:
llj
2012-05-18 14:45:27 +08:00
parent f333633159
commit 9e4225267f
2 changed files with 11 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ td, th { padding: 3px; word-break:break-word; }
th { color:#333; text-align:left; }
tr.even { background-color: #FAFAFA; }
tr.odd { background-color: #EBEBEB; }
tr.hl { background-color: #848; }/*highlight*/
.even th { background:#eee; }
.odd th { background:#ddd; }
tr.first { background-color: #00FF00; }

View File

@@ -15,3 +15,13 @@ $('#yes-btn').click(function() {
//handle table
$("table tr:nth-child(even)").addClass("even");
$("table tr:nth-child(odd)").addClass("odd");
//highlight the tr when mouse hover on it
$("table tr:gt(0)").hover(
function() {
$(this).addClass('hl');
},
function() {
$(this).removeClass('hl');
}
);