Nová ukázka
Reset
Načíst z URL
Uložit a získat odkaz
Vztahuje se k…
Nevyplňujte
Napiště „nejsem robot“
▶
Přepnout zobrazení
Výsledek
<html> <head> <link rel="stylesheet" href="https://mottie.github.io/tablesorter/css/theme.blue.css"> <script type="text/javascript" src="https://mottie.github.io/tablesorter/docs/js/jquery-latest.min.js"></script> <script type="text/javascript" src="https://mottie.github.io/tablesorter/js/jquery.tablesorter.js"></script> </head> <body> <table id="myTable" class="tablesorter-blue"> <thead> <tr> <th>Last Name</th> <th>First Name</th> <th>Email</th> <th class="{sorter: 'czechCurrency'}">Due</th> <th>Web Site</th> </tr> </thead> <tbody> <tr> <td>Smith</td> <td>John</td> <td>jsmith@gmail.com</td> <td>30,50 Kč</td> <td>http://www.jsmith.com</td> </tr> <tr> <td>Bach</td> <td>Frank</td> <td>fbach@yahoo.com</td> <td>30,10 Kč</td> <td>http://www.frank.com</td> </tr> <tr> <td>Doe</td> <td>Jason</td> <td>jdoe@hotmail.com</td> <td>100,00 Kč</td> <td>http://www.jdoe.com</td> </tr> <tr> <td>Conway</td> <td>Tim</td> <td>tconway@earthlink.net</td> <td>50,00 Kč</td> <td>http://www.timconway.com</td> </tr> </tbody> </table> </body> </html>
HTML
Autoformát
Standardní režim
Mobilní zobrazení
CSS
Autoformát
CSS reset
Až na konci
$.tablesorter.addParser({ id: "czechCurrency", is: function(s) { return /^[1-9]\d*(,\d+)? Kč$/.test(s); }, format: function(str, table) { return $.tablesorter.formatFloat(str, table); }, type: "numeric" }); $(function() { $("#myTable").tablesorter({ usNumberFormat: false }); });
J
ava
S
cript
Autoformát
jQuery
Umístění JS
window.onload
</head>
</body>