Debian Codegraph @

docs/example-widget-zebra.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>jQuery tablesorter 2.0 - Zebra Stripe Widget</title>
6
7 <!-- jQuery -->
8 <script src="js/jquery-latest.min.js"></script>
9
10 <!-- Demo stuff -->
11 <link rel="stylesheet" href="css/jq.css">
12 <link href="css/prettify.css" rel="stylesheet">
13 <script src="js/prettify.js"></script>
14 <script src="js/docs.js"></script>
15
16 <!-- Tablesorter: required -->
17 <link rel="stylesheet" href="../css/theme.blue.css">
18 <script src="../js/jquery.tablesorter.js"></script>
19
20 <!-- Tablesorter: optional -->
21 <!-- <script src="../addons/pager/jquery.tablesorter.pager.js"></script> -->
22
23 <style id="css">/* Extra selectors needed to override the default styling */
24 table.tablesorter tbody tr.normal-row td {
25 background: #888;
26 color: #fff;
27 }
28 table.tablesorter tbody tr.alt-row td {
29 background: #555;
30 color: #fff;
31 }</style>
32
33 <script id="js">$(function() {
34
35 // call the tablesorter plugin
36 $("table").tablesorter({
37 theme: 'blue',
38 // initialize zebra striping of the table
39 widgets: ["zebra"],
40 // change the default striping class names
41 // updated in v2.1 to use widgetOptions.zebra = ["even", "odd"]
42 // widgetZebra: { css: [ "normal-row", "alt-row" ] } still works
43 widgetOptions : {
44 zebra : [ "normal-row", "alt-row" ]
45 }
46 });
47
48 });</script>
49 </head>
50 <body>
51 <div id="banner">
52 <h1>table<em>sorter</em></h1>
53 <h2>Zebra Stripe Widget</h2>
54 <h3>Flexible client-side table sorting</h3>
55 <a href="index.html">Back to documentation</a>
56 </div>
57 <div id="main">
58
59 <p class="tip">
60 <em>NOTE!</em>
61 </p>
62 <ul>
63 <li>This widget is part of the plugin, but has been modified from the original.</li>
64 <li>The original "widgetZebra" option has been replaced by "widgetOptions.zebra". See the javascript block below for more details (v2.1).</li>
65 <li>If the "widgetZebra" option exists, it will over-ride this newer "widgetOptions.zebra" option in order to maintain backwards compatibility.</li>
66 <li>The zebra widget only applies to visible rows, so if the table isn't visible in the beginning, you must use <code>$('table').trigger('applyWidgets');</code> when the table becomes visible (See <a href='https://github.com/Mottie/tablesorter/issues/224#issuecomment-13086515'>issue #224</a>)</li>
67 </ul>
68
69 <h1>Demo</h1>
70 <div id="demo"><table class="tablesorter">
71 <thead>
72 <tr>
73 <th>First Name</th>
74 <th>Last Name</th>
75 <th>Age</th>
76 <th>Total</th>
77 <th>Discount</th>
78 <th>Date</th>
79 </tr>
80 </thead>
81 <tbody>
82 <tr>
83 <td>Peter</td>
84 <td>Parker</td>
85 <td>28</td>
86 <td>$9.99</td>
87 <td>20%</td>
88 <td>Jul 6, 2006 8:14 AM</td>
89 </tr>
90 <tr>
91 <td>John</td>
92 <td>Hood</td>
93 <td>33</td>
94 <td>$19.99</td>
95 <td>25%</td>
96 <td>Dec 10, 2002 5:14 AM</td>
97 </tr>
98 <tr>
99 <td>Clark</td>
100 <td>Kent</td>
101 <td>18</td>
102 <td>$15.89</td>
103 <td>44%</td>
104 <td>Jan 12, 2003 11:14 AM</td>
105 </tr>
106 <tr>
107 <td>Bruce</td>
108 <td>Almighty</td>
109 <td>45</td>
110 <td>$153.19</td>
111 <td>44%</td>
112 <td>Jan 18, 2001 9:12 AM</td>
113 </tr>
114 <tr>
115 <td>Bruce</td>
116 <td>Evans</td>
117 <td>22</td>
118 <td>$13.19</td>
119 <td>11%</td>
120 <td>Jan 18, 2007 9:12 AM</td>
121 </tr>
122 </tbody>
123 </table></div>
124
125 <h1>Javascript</h1>
126 <div id="javascript">
127 <pre class="prettyprint lang-javascript"></pre>
128 </div>
129 <h1>CSS</h1>
130 <div id="css">
131 <pre class="prettyprint lang-css"></pre>
132 </div>
133 <h1>HTML</h1>
134 <div id="html">
135 <pre class="prettyprint lang-html"></pre>
136 </div>
137
138 <div class="next-up">
139 <hr />
140 Next up: <a href="example-widgets.html">Widgets, writing your own &rsaquo;&rsaquo;</a>
141 </div>
142
143 </div>
144
145 </body>
146 </html>