Hi Rick,

I put your html/jquery into a file on my test server and gave it a shot. seems to work fine. Only difference in my page is that I put your custom jquery code right into the head of the document, but that shouldn't make a difference.

Check it out here:
http://test.learningjquery.com/showtitle.htm

This is assuming that you wanted to show/hide the title.

Karl
_______________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com

On Nov 18, 2006, at 3:43 PM, Rick Faircloth wrote:

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/

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

Reply via email to