views:

501

answers:

2

I have a working example of the Wordpress/jQuery plugin on this test page: http://beerlyrics.com/jimmy-jones/

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: http://farmball.com/boston/boston-red-sox/red-sox-roster/

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
                    });  });
A: 

Try jQuery.noConflict?

songdogtech
The jQuery library included with Wordpress loads in "no conflict" mode. In order to use the $ function as usual, use the following:jQuery(document).ready(function($) { // $() will work as an alias for jQuery() inside of this function});Unfortunately, doing this causes it to break altogether so I had to switch it back to function($) {I feel I'm pretty close...
Adam
A: 

I hired a developer to fix this. Strange but the fix was that there was a missing ( at the beginning of one of the js files in FTP though cPanel showed it at the beginning of the file. I use cPanel and didn't know it was missing.

Adam