Rick Faircloth schrieb:
> 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
This sounds to me like a typical teaser element. I would use a h2/p pair
for that.
Err, what do you mean by "behavior of list elements"? The way they look
by default? That is simply a matter of style. Choose the markup you need
from a semantic standpoint, not from how it looks. You can make every
element look what you want it to with CSS.
-- Klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/