I have a script that currently i use in an FAQ page which when you click on the link it will "show" the text and when you click the link again it will hide.

Here is the current code :

PHP Code:
        <script type="text/javascript" charset="utf-8">

          function 
toggleDisplay(element) {

            
// Toggle the display of the first div
            
var content element.getElementsByTagName("div")[0];

            if (
content.style.display == "block") {
              
content.style.display "none";
            } else {
              
content.style.display "block";
            }

            
// disable the link action
            
return false;
          }

        
</script> 
and the html that uses the code :

PHP Code:
<div class='toggle-block'>
<
p><a href='#' onclick='return toggleDisplay(this.parentNode.parentNode)'>TITLE OF FAQ</a></p>
                                <
div class='toggle-content'>
                                 
FAQ Details FAQ Details FAQ Details FAQ Details  
                                
</div>
                             </
div
What i would like to do however is have the link to open the text at one point and the text displayed in another.

so as an example :

PHP Code:
<div class='toggle-block'>
<
p><a href='#' onclick='return toggleDisplay(this.parentNode.parentNode)'>TITLE OF FAQ</a></p>
</
div>
**
SOME HTML HERE***
                                <
div class='toggle-content'>
                                 
FAQ Details FAQ Details FAQ Details FAQ Details  
                                
</div
Does anyone have any ideas on how i can modify the code to do this?

Thanks in advance

Rodent