Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Show/Hide

Posted on 2013-05-17
4
Medium Priority
?
277 Views
Last Modified: 2013-05-31
I want to create a FAQ list of questions.  When you click on the question the answer is displayed.  That simple.  Here is what I have found which works somewhat.  I need for the question to remain displayed all the time, just add the answer.

<script type="text/javascript">
<!--
    function toggle_visibility(id) {
       var e = document.getElementById(id);
       if(e.style.display == 'block')
          e.style.display = 'none';
       else
          e.style.display = 'block';
    }
//-->
</script>



<div>
<span id="show1" class="show"><a href="#" onclick="showit('readthis1');hideit('show1');"><h3><h2>Will Gc mess up?</h2></h3></a></span><span id="readthis1" class="hide"> No. GC emits no signals, emissions or transmissions.<br /></span>
</div>
0
Comment
Question by:akbiro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 19

Assisted Solution

by:Albert Van Halen
Albert Van Halen earned 668 total points
ID: 39174399
Have a look here : http://jsfiddle.net/wZ7Fc/
0
 
LVL 10

Accepted Solution

by:
Ishaan Rawat earned 1332 total points
ID: 39174602
0
 
LVL 10

Assisted Solution

by:Ishaan Rawat
Ishaan Rawat earned 1332 total points
ID: 39174633
Or check this..

Its fully made of HTML and CSS only...

http://jsfiddle.net/IshaanRawat/tbhmL/
0
 

Author Closing Comment

by:akbiro
ID: 39210334
Thank you very much.  I am going to post another question asking someone to look at the code I added to my page and tell me why it is not working.  It works in Dreamweaver, but not on the server.  Thanks!!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question