Announcement

Collapse
No announcement yet.

collapsable tables -> default setting?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bad Bunny
    replied
    When I do this, the default collapse/expand image is opposite when it's first viewed. In other words, normally you would want to see the button indicationg you can minimize a section, but now you would want to see the image indicating you can expand a section. But the opposite shows.
    How could I change this?

    Leave a comment:


  • Kier
    replied
    All you need to do is to add
    Code:
    style="display:none"
    to the <tbody> element that is supposed to collapse and the vBulletin collapsing element system will deal with the rest.

    The reason you won't find any examples of this in the default templates is that if a visitor has Javascript disabled they will not be able to expand the element, and will therefore never see the hidden content.

    By having everything open by default we ensure that only people whose browsers are capable of collapsing and expanding elements have the option to do so.

    Leave a comment:


  • Floris
    replied
    I am not the js guru, so I can't answer for sure.

    Leave a comment:


  • Troubadix
    replied
    so this is the wrong forum?
    or would you go as far as to say that this is a hack?

    I was looking for a built in option i could put in the template. something like $collapsabletable_closed, that would result in the table collapsable to to be closed by default.

    So I assume there is no such option?

    Leave a comment:


  • Floris
    replied
    I think you need to modify the javascript instead of templates in order to have the collapsed by default.

    Leave a comment:


  • Troubadix
    started a topic collapsable tables -> default setting?

    collapsable tables -> default setting?

    Hi

    I'm looking for a way to have a collapsable table closed by default. Is there a way to do this?

    Also, I am trying to steer the collapsing thing with two radiobuttons. So if someone clicks yes, the table uncollapses, if someone clicks no, it collapses. Suggestions and/or answers to how I would do that?


    Thanks

Related Topics

Collapse

Working...
X