Here is my sample HTML document and I've attached a copy of this and the JS file.
If you need any assistance or further information I will be happy to oblige.
Andy.
Code:
<!DOCTYPE html>
<html>
<head>
<title>Table Sorting</title>
<style type="text/css">
table#todos {
width: 50%;
}
table#todos td+td, table#todos td+td+td {
text-align: right;
}
</style>
<script type="text/javascript" src="sorttable.js"></script>
<script type="text/javascript">
function init() {
AddSortToTables();
AddSortByNumber('todos', 1);
AddSortByDate('todos', 2, 'd m yyyy');
}
window.onload = init;
</script>
</head>
<body>
<table id="todos" class="sortIt" title="" summary="sorting">
<thead>
<tr>
<th style="text-align:left">To Do</th>
<th style="text-align:right">Priority</th>
<th style="text-align:right">Target Date</th>
</tr>
</thead>
<tbody>
<tr><td>Learn JavaScript!</td><td>1</td><td>4 12 2012</td></tr>
<tr><td>Write a book</td><td>3</td><td>6 12 2012</td></tr>
<tr><td>Earn lots of money</td><td>1</td><td>12 12 2012</td></tr>
<tr><td>Lose 2 pounds</td><td>4</td><td>5 12 2012</td></tr>
<tr><td>Build a Website!</td><td>2</td><td>5 12 2012</td></tr>
<tr><td>Work hard</td><td>5</td><td>1 12 2012</td></tr>
<tr><td>Be good</td><td>200</td><td>1 2 2013</td></tr>
</tbody>
</table>
</body>
</html>
The .js file is zipped. I could post the actual code but would need to split it over 2 or 3 posts - if requested.