| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<title>Stupid jQuery table sort (colspan test)</title> |
| •5 |
<script src="/usr/share/javascript/jquery/jquery.min.js"></script> |
| 6 |
<script src="/usr/share/javascript/jquery-stupidtable/stupidtable.js?dev"></script> |
| 7 |
<script> |
| 8 |
$(function(){ |
| 9 |
$("table").stupidtable(); |
| 10 |
}); |
| 11 |
</script> |
| 12 |
<style type="text/css"> |
| 13 |
table { |
| 14 |
border-collapse: collapse; |
| 15 |
} |
| 16 |
th, td { |
| 17 |
padding: 5px 10px; |
| 18 |
border: 1px solid #999; |
| 19 |
} |
| 20 |
th { |
| 21 |
background-color: #eee; |
| 22 |
} |
| 23 |
th[data-sort]{ |
| 24 |
cursor:pointer; |
| 25 |
} |
| 26 |
tr.awesome{ |
| 27 |
color: red; |
| 28 |
} |
| 29 |
</style> |
| 30 |
</style> |
| 31 |
</head> |
| 32 |
|
| 33 |
<body> |
| 34 |
|
| 35 |
<h1>Stupid jQuery table sort! (colspan test)</h1> |
| 36 |
|
| 37 |
<p>Tables using colspans are handled just fine.</p> |
| 38 |
|
| 39 |
<table id="stupid"> |
| 40 |
<thead> |
| 41 |
<tr> |
| 42 |
<th colspan="4">The Big Table Header</th> |
| 43 |
</tr> |
| 44 |
<tr> |
| 45 |
<th data-sort="string">Letter</td> |
| 46 |
<th colspan="2" data-sort="string">colspan=2</th> |
| 47 |
<th data-sort="int">Number</td> |
| 48 |
</tr> |
| 49 |
</thead> |
| 50 |
<tbody> |
| 51 |
<tr> |
| 52 |
<td>def</td> |
| 53 |
<td>X</td> |
| 54 |
<td>9</td> |
| 55 |
<td>1</td> |
| 56 |
</tr> |
| 57 |
<tr> |
| 58 |
<td>abc</td> |
| 59 |
<td>Z</td> |
| 60 |
<td>8</td> |
| 61 |
<td>2</td> |
| 62 |
</tr> |
| 63 |
<tr> |
| 64 |
<td>bcd</td> |
| 65 |
<td>Y</td> |
| 66 |
<td>7</td> |
| 67 |
<td>0</td> |
| 68 |
</tr> |
| 69 |
</tbody> |
| 70 |
</table> |
| 71 |
|
| 72 |
</body> |
| 73 |
</html> |