Show / hide several div
<p>I use this script :</p>

<pre><code>    &lt;script language="javascript"&gt; 
function toggle() {
    var ele = document.getElementById("mydiv");
    var text = document.getElementById("displayText");
    if(ele.style.display == "block") {
            ele.style.display = "none";
        text.innerHTML = "show";
    }
    else {
        ele.style.display = "block";
        text.innerHTML = "hide";
    }
} 
&lt;/script&gt;
</code></pre>

<p>Called by :</p>

<pre><code>            echo '&lt;a id="displayText" href="javascript:toggle();"&gt;show&lt;/a&gt;';
</code></pre>

<p>i want to show / hide several div (not in a list or a form)</p>

<p>i try :</p>

<pre><code>    var ele = document.getElementById("mydiv", "mydiv2");
</code></pre>

<p>but it's showing and hidding only the first div</p>
