calling custom function from document.ready

calling custom function from document.ready

I have a table which needs to be sorted. Tablesorter plugin does not fully work. I am trying to call a simple alternate function from jQuery $(document).ready method. How to make it work?

$(document).ready(function() {
    $("#tableID").tablesorter({
       ....
    });
    alternate('tableID');
});