How to I reveal a section of my page on the click of a button?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jjchrist
    New Member
    • Nov 2008
    • 1

    How to I reveal a section of my page on the click of a button?

    I want to have a button that when clicked, reveals a section of my page including several images, text, tables, and some drop down menus. I want the page to start with that section hidden at first but other sections visible. Is there a code to do this? Ideally I would like to just drop the code into something simple like this:

    When user clicks this button reveal the following [

    here is where the code for all my images, text, tables, and drop down menus goes.

    ]

    Please help. Thanks.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Yes, this is possible, but not with HTML/CSS. You need JavaScript. I can move this thread to the JavaScript forum for you.

    Look into the style.display property. Set to "none", the content will be hidden. If you set it to "block" in your function called onclick, the content will show up. An alternative is the style.visibilit y property.

    Comment

    Working...