Solved

Show/Hide

Posted on 2013-05-17
4
267 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
  • 2
4 Comments
 
LVL 19

Assisted Solution

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

Accepted Solution

by:
Ishaan Rawat earned 333 total points
ID: 39174602
0
 
LVL 9

Assisted Solution

by:Ishaan Rawat
Ishaan Rawat earned 333 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Angular JS Route 3 52
Alignment is not working correctly. 8 32
wordpress display sub menu only when click 12 23
Slider Moving to right hand side CSS? 2 8
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now