Title: Why does this code not work?

Hi, all

Trying to grasp js and jQuerywhy wont this code work?

(No response on my test page at all to the code)

JQuery code:

$(document).ready(function() {

        $("div.ann").find("p.title").hide().end().find("p.text").click(function() {

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

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

             answer.slideUp();

         } else {

             answer.slideDown();

         }

     });

});

HTML:

<div class=ann>

<p class=title>

This is my title

</p>

<p class=text>

This is my text

</p>

</div>

???

Thanks,

Rick

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

Reply via email to