Solved

tablesorter not working

Posted on 2013-11-05
3
326 Views
Last Modified: 2013-11-05
Hi all.

I'm trying to use the tablesorter jquery solution but unfortunately, it does not sort when one of the headers are clicked and the table does not appear as it does on the tablesorter site, it appears flat with no lines. Below is my code, I have both the files in my js folder on my webserver.

What am I doing wrong?

Thank you in advance.

<html>
<title>Web App</title>
  <head>
<script type="text/javascript" src="js/jquery-latest.js"></script> 
<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script> 

<script type="text/javascript">
$(document).ready(function() { 
    // call the tablesorter plugin 
    $("#Table").tablesorter();
    }; 
</script> 
</head>
<table id="Table" class="tablesorter"> 
<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>jsmith@gmail.com</td> 
    <td>$50.00</td> 
    <td>http://www.jsmith.com</td> 
</tr> 
<tr> 
    <td>Bach</td> 
    <td>Frank</td> 
    <td>fbach@yahoo.com</td> 
    <td>$50.00</td> 
    <td>http://www.frank.com</td> 
</tr> 
<tr> 
    <td>Doe</td> 
    <td>Jason</td> 
    <td>jdoe@hotmail.com</td> 
    <td>$100.00</td> 
    <td>http://www.jdoe.com</td> 
</tr> 
<tr> 
    <td>Conway</td> 
    <td>Tim</td> 
    <td>tconway@earthlink.net</td> 
    <td>$50.00</td> 
    <td>http://www.timconway.com</td> 
</tr> 
</tbody> 
</table> 		
</html>

Open in new window

0
Comment
Question by:Sim1980
3 Comments
 
LVL 3

Accepted Solution

by:
mikeyd234 earned 250 total points
ID: 39626201
For the theming you need to download and include the css file:

http://tablesorter.com/themes/blue/style.css
0
 
LVL 82

Assisted Solution

by:leakim971
leakim971 earned 250 total points
ID: 39626208
line 11, replace :
 };
by :
 });

test page : http://jsfiddle.net/9dNLe/1/
right click and choose view source here : http://fiddle.jshell.net/9dNLe/1/show/
0
 

Author Closing Comment

by:Sim1980
ID: 39626243
Thank you both! It worked.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now