Here's the code I'm using:
function load(toLoad, area){
$(area).html('<img src="images/ajax-loader.gif" alt="Loading" class="center" />');
loadContent();
function loadContent() {
$(area).load(toLoad,'',sorter())
};
function sorter() {
alert('s');
$("#myTable").tablesorter({
widgets: ['zebra']
});
};
return false
};
When the load function is called, the alert shows when the loading image is shown, rather than after it has finished loading.
What is wrong with it?