Hi there,
I have a table which is sorted successfully using the tablesorter plugin. However, I want to highlight the text in a particular text field in a particular row. It has a unique ID, but when I place my code after the sorting code it doesn't work. Here's my code:
jQuery(document).ready(function() {
jQuery("#filetable").tablesorter({
sortList: [[3,1]],
widgets: ['zebra'],
testExtraction: "complex"
});
//my new code which doesn't work as expected
if(jQuery("#new_foldername").length > 0){
jQuery("#new_foldername").focus(function() { jQuery(this).select(); } );
}
});
If I stick an alert just after the check to see if the #new_foldername exists, I see the alert, and I see the text highlighted in the background (so my code to highlight the text works). When I click to close the alert, then the table finishes sorting... and the text is not highlighted any more.
Any ideas what might be happening?