Solved

tablesorter not working

Posted on 2013-11-05
3
339 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: blockā€¦
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

773 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