|
Klikk på linkene, og du får mer informasjon. Bra til FAQ etc. |
|
Putt style mellom HEAD-taggene
<style type="text/css">
<!-- .para {font-family: "Verdana","Arial","sans-serif"; font-size: 10pt;} a.headings:link {color: #000000;text-decoration:underline;width:100%;} a.headings:visited {color: #aa6611; width:100%} a.headings:hover {color: #ff9933; text-decoration:none; width:100%} a.headings:active {color: #0000ff;width:100%} a.headings {background-repeat:no-repeat;font-family:"Verdana","arial","sans-serif";font-size:10px;} --> </style> Putt dette scriptet mellom HEAD-taggene
<script type="text/javascript">
<!-- Begin var subs_array = new Array("sub1","sub2","sub3");// Put the id's of your hidden divs in this array function displaySubs(the_sub){ if (document.getElementById(the_sub).style.display==""){ document.getElementById(the_sub).style.display = "none";return } for (i=0;i<subs_array.length;i++){ var my_sub = document.getElementById(subs_array[i]); my_sub.style.display = "none"; } document.getElementById(the_sub).style.display = ""; } // End --> </script>
<p><a href="javascript:void(0)" class="headings" onClick="displaySubs('sub1')" onFocus="if(this.blur)this.blur()";>
<strong>Overskrift 1</strong> </a> </p> <div class="para" id="sub1" style="display:none"> Tekst til sub1 </div> <p><a href="javascript:void(0)" class="headings" onClick="displaySubs('sub2')" onFocus="if(this.blur)this.blur()";> <strong>Overskrift 2</strong> </a> </p> <div class="para" id="sub2" style="display:none"> Tekst til sub2 </div> <p><a href="javascript:void(0)" class="headings" onClick="displaySubs('sub3')" onFocus="if(this.blur)this.blur()";> <strong>Overskrift 3</strong> </a> </p> <div class="para" id="sub3" style="display:none"> Tekst til sub3 </div> |