Title: Why won't this work?

Hi, all

I finally started experimenting with jQuery and I must

say, it does show great promise.

I started working with the jQuery Starterkit at

http://jquery.bassistance.de/jquery-getting-started.html

The straight-forward implementation of the syntax makes

this easy to work with, especially after studying the source of the

sample page, starterkit.html, included in the download for the kit.

I tried some of the sample code on one of my own sites, just experimenting,

and was able to get some responseall seemed well.


However, since that first experiment, I cant seem to get any response

to the jQuery script.

I made it really simple to try to troubleshoot the problem:

I created a single sample page, put the custom.js in the same directly so I would

know the path to the code is correct.

I coded the target page in accordance with the straterkit.html page.

The page just shows the text, but no response to the _javascript_.

In detail, code included, heres what I did:

Once create directory for sample page called Website_Trials

Next, put the custom js in the directory so we have T:\Website_Trials\custom.js

One the html page I  have

<script type=text/_javascript_ src="">custom.js></script>

(The html page and custom.js are in the same directory above.)

The code of the html page is as follows:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

        <title>Untitled</title>

       

<script type="text/_javascript_" src="">

<script type="text/_javascript_" src=""

       

</head>

<body>

<dl id="ann">

<dt>Question that needs an answer...</dt><br>

<dd>Here is the answer to the question!</dd>

</dl>

</body>

</html>

My custom.js contains this code:

$(document).ready(function() {

        $('#ann').find('dd').hide().end().find('dt').click(function() {

         var answer = $(this).next();

         if (answer.is(':visible')) {

             answer.slideUp();

         } else {

             answer.slideDown();

         }

     });

});

Anybody have any clues about what Im missingIm sure its something simple

Help!  This has been driving me crazy all weekend and I cant get past this mentally

to get any work done!

Thanks,

Rick

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to