Try clicking twice on a header.  The first click won't appear to do anything
if the table is already sorted.

-- Josh

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of bayadmin
Sent: Wednesday, May 27, 2009 1:30 PM
To: jQuery (English)
Subject: [jQuery] Re: Tablesorter is not enabled on my page


Hmm....I tried those, too. I changed both the function and table to
another example given in the documentation:

1) the  scripts and function in the header.php:

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

<script type="text/javascript" id="js">

$(document).ready(function() {
    // call the tablesorter plugin
    $("table").tablesorter();
});

</script>
<?php

wp_head(); ?>

</head>

2) The table itself.

<table class="tablesorter" cellspacing="1">
    <thead>
        <tr>
            <th>first name</th>
            <th>last name</th>
            <th>age</th>
            <th>total</th>
            <th>discount</th>
            <th>diff</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>peter</td>
            <td>parker</td>
            <td>28</td>
            <td>9.99</td>
            <td>20.3%</td>
            <td>+3</td>
        </tr>
        <tr>
            <td>john</td>
            <td>hood</td>
            <td>33</td>
            <td>19.99</td>
            <td>25.1%</td>
            <td>-7</td>
        </tr>
    </tbody>
</table>

Still no difference. -Amy

On May 27, 1:16 pm, GaVrA <ga...@crtaci.info> wrote:
> Ehh... Faster then me for 3min... :P
>
> On May 27, 10:11 pm, Jonathan <jdd...@gmail.com> wrote:
>
> > the ID 1 is invalid.
>
> > Seehttp://www.w3.org/TR/REC-html40/types.html#type-name
>
> > On May 27, 10:26 am, bayadmin <admin.baynet...@gmail.com> wrote:
>
> > > 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:
> > >
(perhttp://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
whathttp://tablesorter.com/docs/#Getting-Startedseemtobe 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
fromhttp://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