views:

18

answers:

2

Sorry for the lame question.

I am trying to run a simple getting started tablesorter example with no luck.

I know my jquery works because I made a 'hello world' alert test.

I downloaded the .js files and placed them in my working directory/folder.

Firebug "Reponse" window shows me there is actual .js code in the files.

Firebug says Status: "304 Not Modified", Doamin: "localhost".

I am usimng WAMP.

<head>


<script src="jquery1.4.2.js" type="text/javascript"></script>
<script src="jquery.tablesorter.min.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function() 
            { 
                $("#myTable").tablesorter(); 
                $("a").click(function() {alert("Hello world!")} );
            }
        );  
</script>



</head>

<body>
<a href="">Link</a>

<table id="myTable"class="tablesorter" border="2" cellpadding="0" cellspacing="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>[email protected]</td> 
    <td>$50.00</td> 
    <td>http://www.jsmith.com&lt;/td&gt; 
</tr> 
<tr> 
    <td>Bach</td> 
    <td>Frank</td> 
    <td>[email protected]</td> 
    <td>$50.00</td> 
    <td>http://www.frank.com&lt;/td&gt; 
</tr> 
<tr> 
    <td>Doe</td> 
    <td>Jason</td> 
    <td>[email protected]</td> 
    <td>$100.00</td> 
    <td>http://www.jdoe.com&lt;/td&gt; 
</tr> 
<tr> 
    <td>Conway</td> 
    <td>Tim</td> 
    <td>[email protected]</td> 
    <td>$50.00</td> 
    <td>http://www.timconway.com&lt;/td&gt; 
</tr> 
</tbody> 
</table> 



</body>

alt text

A: 

It worked fine for me when I ran your HTML through jsfiddle (link here). I know that the default jQuery filename is jquery-<version>.js, and I see that your source is missing the hyphen.

You said that the source shows up correctly in both of your files, though, so I'm not sure what's wrong here. Maybe something within jQuery expects the default filename?

jwiscarson
No I dont think it my code work, but thanks for trying and showing me that jsfiddle site. I added an image to my question showing what the table will look like if my code had worked properly.
indiehacker
A: 

I forgot to download the CSS files and make my web page aware of them! woops!!

indiehacker