Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #434971

    Is it possible to hide the content of a specific section on a page until a button is clicked? I would like it to act similar to the way that the accordion feature works but I want to use a large button as the trigger instead and I would like the section that is to be hidden to be a separate color section than where the button resides. I’m sure there’s an easy way to do this that I’m overlooking.

    Best,

    #435588

    Hi dburton77!

    It’s kind of bordering on custom work. If you copy the HTML for the button and then add it to a codeblock element to your page you could then add a onclick attribute to execute some javascript when it is clicked on, http://www.w3schools.com/jsref/event_onclick.asp.

    And then in the javascript you could use jQuery to show() or slideDown() the section like so.

    jQuery("#customID").show();
    

    http://api.jquery.com/show/

    And then you would have to give the section a custom ID and use some CSS to hide it like so.

    #customID { display: none; }
    

    Cheers!
    Elliott

    #436499

    I’ll give it a try! Many Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Hide Specific Color Section Until Button Is Clicked’ is closed to new replies.