Javascript – Why doesn’t jQuery Tablesorter Plugin work on this WordPress page

javascript, jquery, tablesorter, wordpress

I have a working example of the WordPress/jQuery plugin on this test page:

I hardcoded it into the header on this page and both the pagination and filter mechanisms work correctly.

I have converted this over to a new page and am now using wp_enqueue to call all my scripts as it is supposed to be done:

Why wouldn't the pagination and filter mechanisms no longer work?

I have confirmed that it has nothing to do with a #baseball-table not defined error and an audiplayer error that comes up in Firebug. The #baseball-table error is occurs on both sites and I deactivated the plugin causing the audioplayer error and it made no difference to plugin performance.

Here is the code for js initialization:

  jQuery(document).ready(function($) {        $("#baseball-table").tablesorter({ debug: false, sortList: [[0, 0]], widgets: ['zebra'] })                    .tablesorterPager({ container: $("#pager"), positionFixed: false })                    .tablesorterFilter({ filterContainer: $("#filter-box"),                        filterClearContainer: $("#filter-clear-button"),                        filterColumns: [0, 1, 2, 3, 4, 5, 6, 7, 8],                        filterCaseSensitive: false                    });  });

Best Solution