Expand and hide a div on click and expand one at a time
<p>I want to expand a div at a time AND expand/hide the div on click. In other words, when one div is open the other should be closed and both div can be open at the same time.</p>

<p>This is my code:</p>

<pre><code>    $(document).ready(function(){
    //Hide the tooglebox when page load
    $(".togglebox").hide();
    //slide up and down when click over heading 2
    $(".toggletxt").click(function(){
    // slide toggle effect set to slow you can set it to fast too.
    $(this).next(".togglebox").slideToggle("slow");
    return true;
    });
    });
</code></pre>

<p>This code will hide both div (togglebox) and expand on click to toogletxt. But both div can be expanded if I click on its toogletxt.</p>
