Rey,

I tried changing my code and tried your code, but still get the same
response on the HTML page. text is static.  The cursor does change
to hand when I mouseover the title, however.  Seems like the js isn't
working at all.  I know I'm just missing something simple.

I put the jquery.js and custom.js in the same directory as the
HTML page just to make sure it's not a path problem.

See any problem in the code below?

Thanks for your help!

Rick


Between the head tags I have:


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


My custom.js contains:


$(document).ready(function() {

$("div.ann").find("p.title").hide().end().find("p.text").click(function()
  {
           if ($("p.title").is(':visible')) {
               $("p.title").slideUp();
           } else {
               $("p.title").slideDown();
           }
       });
  });


My HTML page has:

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

<html>
<head>
        <title>Untitled</title>
        
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="custom.js"></script>        
        
</head>

<body>

<div class="ann">

<p class="title" style="cursor: hand;">
This is the title...
</p>

<p class="text">
This is the text...
</p>

</div>

</body>
</html>

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

Reply via email to