One simple approach is a div containing the toggle link/header at the top and another div wrapping the actual text. Inside the link click event you simply toggle all siblings of 'this'.

Blair

On 11/14/06, Rick Faircloth <[EMAIL PROTECTED]> wrote:

Hi, all

I would like to be able to show announcement titles on a page,

initially hide the text, then on clicking the title, have the text

slide down or up.

The following example uses list elements to do this, but I would

like to use something else because of the behavior of list elements.

$(document).ready(function() {

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

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

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

             answer.slideUp();

         } else {

             answer.slideDown();

         }

     });

});

Could I use a named anchor or something else to create this effect?

I don't see why I couldn 't, but what would I use in place of the

"dd" and "dt" elements?  Other anchors or what?  DIV 's?

Thanks for any guidance or suggestions

Rick


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



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

Reply via email to