Jquery tablesorter in wordpress

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Jquery tablesorter in wordpress

n3v3r4get@gmail.com
Yes
Download tablesorter at
tablesorter.com

upload to your wordpress

place this at wordpress header

<script type="text/javascript" src="/path/to/jquery-latest.js"></script>   
<script type="text/javascript" src="/path/to/jquery.tablesorter.js"></script>
<link rel="stylesheet" type="text/css" href="themes/green/style.css" />


In you post or where you want your table to be. place following code

<table id="myTable"> 
<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>[hidden email]</td> 
    <td>$50.00</td> 
    <td>http://www.jsmith.com</td> 
</tr> 
<tr> 
    <td>Bach</td> 
    <td>Frank</td> 
    <td>[hidden email]</td> 
    <td>$50.00</td> 
    <td>http://www.frank.com</td> 
</tr> 
<tr> 
    <td>Doe</td> 
    <td>Jason</td> 
    <td>[hidden email]</td> 
    <td>$100.00</td> 
    <td>http://www.jdoe.com</td> 
</tr> 
<tr> 
    <td>Conway</td> 
    <td>Tim</td> 
    <td>[hidden email]</td> 
    <td>$50.00</td> 
    <td>http://www.timconway.com</td> 
</tr> 
</tbody> 
</table>

Place this code into javascript jquery.tablesorter.js

$(document).ready(function() 
    { 
        $("#myTable").tablesorter(); 
    } 
); 
   


mytable is your table ID that you can change. you can customize your table width or anything in green/style.css if you are using green style.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery Plugins" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-plugins?hl=en
-~----------~----~----~----~------~----~------~--~---