SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Oct 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Jquery Accordion - CSS styling OnClick question

    Hello,

    Could somebody help me with CSS styling on this accordion?

    http://web.me.com/zumajoe/accordion/

    (taken from: http://www.stemkoski.com/stupid-simp...ccordion-menu/)

    I have 2 sets of text within the Button Div- the Title text and then a short Description text.

    I would like for the onClick to toggle transparency for the “Description text”. (In the off-state I want it to be invisible)

    .transparent
    {
    /* for IE */
    filter:alpha(opacity=0);
    /* CSS3 standard */
    opacity:0;
    }

    Even better, is there a way to have 2 seperate CSS classes for the Description text for On state and the Off state?
    Attached Files Attached Files

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,276
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    If I understand correctly then you could use the "on" class to reveal the description text that is in the span.

    e.g.
    Code:
    .accordionButtonNotes{display:none}
    .on .accordionButtonNotes{display:inline}
    Is that what you meant ?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •