Bug Tracker

Ticket #3677: TableStips.html

File TableStips.html, 1.4 KB (added by aboozar, 13 years ago)

Sample code

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5<title>Untitled Document</title>
6<script type="text/javascript" src="jquery-1.2.6.min.js"></script>
7<script type="text/javascript">
8$(function(){
9$("tr:not('.header') + tr:not('.footer')").hover(function(){$(this).addClass("highlighted");},function(){$(this).removeClass("highlighted");});
10});
11</script>
12<style type="text/css">
13.header
14{background-color:#000099;
15color:#FFFFFF;
16}
17
18.footer
19{
20background-color:#333333;
21color:#FFFF00;
22}
23
24.highlighted
25{
26background-color:#FFFF00;
27color:black;
28}
29</style>
30</head>
31
32<body>
33
34<table>
35<tr class="header"><td>First Culumn</td><td>Second Column</td><td>Third Column</td></tr>
36<tr><td>First Value1</td><td>Second Value</td><td>Third Value</td></tr>
37<tr><td>First Value</td><td>Second Value</td><td>Third Value</td></tr>
38<tr><td>First Value</td><td>Second Value</td><td>Third Value</td></tr>
39<tr><td>First Value</td><td>Second Value</td><td>Third Value</td></tr>
40<tr><td>First Value</td><td>Second Value</td><td>Third Value</td></tr>
41<tr><td>First Value</td><td>Second Value</td><td>Third Value</td></tr>
42<tr class="footer"><td>First Footer</td><td>Second Footer</td><td>Third Footer</td></tr>
43
44
45</body>
46</html>