$("#LN").click( {parm:0},sortTable );
function sortTable(event) {
var col = event.data.parm;
var rows = $('#sTBL tbody tr').get();
rows.sort(function(a, b) {
var A = $(a).children('td').eq(col).text().toUpperCase();
var B = $(b).children('td').eq(col).text().toUpperCase();
if(A < B) {
return -1;
}
if(A > B) {
return 1;
}
return 0;
}
);
$.each(rows, function(index, row) {
$('#sTBL').children('tbody').append(row);
}
);
}
The line starting with $('#sTBL') causes the syntax error when the last row is appended to the table. The 0 (zero) represents the column that was clicked to be sorted.
I don't get "ANY" syntax errors using Chrome. Does my customer have to live with this as long as they insist on using XP and IE8 or is there something "I" need to do to alleviate the syntax error.
Thank you in advance for your help and response.