Hello, I am trying out the Tablesorter in Wordpress 2.7.1  to make a
membership list sortable. For some reason the sortable features isn't
being enabled (or at least visible). I need help find the culprit.
Here are the steps I've taken so far:

1)
In the header.php file I added the following code between the head
tags:

<head>
<script type="text/javascript" src="library/scripts/jquery-
latest.js"></script>
<script type="text/javascript" src="library/scripts/
jquery.tablesorter.js"></script>

<?php

wp_head(); ?>

</head>

(the scripts directory is located at /wp/wp-content/themes/mytheme/
library/scripts/)

2)
and in the jquery.tablesorter.js script I added the following code
just below the comments at the top:
(per http://www.nabble.com/Tablesorter-Into-Wordpress-page-td21007774.htm)

$(document).ready(function()
    {
        $("1").tablesorter( {sortList: [[0,0], [1,0]]} );
    }
);

(I tried putting this function in the header itself, as what
http://tablesorter.com/docs/#Getting-Started seem to be saying, but
this had only the effect of displaying this code on the page itself.)

3)
On the page with the table, I used the same sample table from
http://tablesorter.com/docs/#Getting-Started, using "1" for the ID.

<table id="1">
<thead>
<tr>
    <th>Last Name</th>
    <th>First Name</th>
    <th>Email</th>
    <th>Due</th>
    <th>Web Site</th>
</tr>
</thead>
<tbody>
<tr>
    <td>Smith</td>
    <td>John</td>
    <td>jsm...@gmail.com</td>
    <td>$50.00</td>
    <td>http://www.jsmith.com</td>
</tr>
<tr>
    <td>Bach</td>
    <td>Frank</td>
    <td>fb...@yahoo.com</td>
    <td>$50.00</td>
    <td>http://www.frank.com</td>
</tr>
</tbody>
</table>

But, while the table shows up on the page, the sortable features are
not visible.

NOTE: In Wordpress  I have the WP-Table Reloaded plugin activated, but
to trouble shoot this issue, I am not using the shortcode and using a
HTML table directly in the page, for now.

Please advise what I need to do to fix this?

Thanks!
Amy

Reply via email to