19,667
edits
(only seems to work the first few times I try it; what gives?) |
(removing all but one alert(); either the code fires or it doesn't...) |
||
| Line 545: | Line 545: | ||
if ($(theTable).hasClass(colOption)) | if ($(theTable).hasClass(colOption)) | ||
{ | { | ||
sortColumnNum = col; | sortColumnNum = col; | ||
// Now look for sort button and click it | // Now look for sort button and click it | ||
var allTHs = theTable.getElementsByTagName("th"); | var allTHs = theTable.getElementsByTagName("th"); | ||
if (!allTHs) | if (!allTHs) continue; | ||
for (var k = 0; k < allTHs.length; k++) | for (var k = 0; k < allTHs.length; k++) | ||
{ | { | ||
if ($(allTHs[k]).hasClass("headerSort")) | if ($(allTHs[k]).hasClass("headerSort")) | ||
{ | { | ||