Is there any way to get the following code to refresh after every
sort?
The < $("#myTable").each(function(){ > numbers it, and if I replace
it with < $("#myTable").bind("sortEnd",function(){ > it just adds a
new numbered row after every sort (three sorts gets you three columns
of numbers).
--------------------------------------
$(document).ready(function(){
$("#myTable").each(function(){
if($(this).is('table')){
$('thead th:first-child, thead td:first-child', this).each
(function(){
if($(this).is('td'))
$(this).before('<td>#</td>');
else if($(this).is('th'))
$(this).before('<th>Item</th>');
});
$('tbody td:first-child', this).each(function(i){
$(this).before('<td>'+(i+1)+'</td>');
});
}
});