How can I toggle height of <a> where it would work like an accordion?
<p>I am having trouble setting this up for multiple divs. I have it here <a href="http://jsfiddle.net/DpffX/" rel="nofollow">http://jsfiddle.net/DpffX/</a> set up for only one. I would like to have the height of link increase onclick and a hidden div slideDown. When clicking the second link, the first div would slide up then link height back to original height, and second link go through the same opening sequence, so everything works like an accordion. *link tag has a bg image which is a line so it would look like a line is being drawn to the hidden div. Thank you. Updated fiddle jsfiddle.net/J2ySt/2</p>

<p>HTML</p>

<pre><code>&lt;div class="slider2"&gt;
    &lt;h2&gt;title&lt;/h2&gt;
    &lt;a href="#" class="line"&gt;link1 |&lt;/a&gt;
    &lt;a href="#" class="line"&gt;link2 |&lt;/a&gt;
    &lt;a href="#" class="line"&gt;link3 |&lt;/a&gt;
    &lt;a href="#" class="line"&gt;link4 |&lt;/a&gt;
&lt;/div&gt;&lt;!-- end .slider2 --&gt;
&lt;div id="link1" style="height:100px; background:#000; color:#fff; margin-left:20px; display:none;"&gt;content1&lt;/div&gt;
&lt;div id="link2" style="height:100px; background:#000; color:#fff; margin-left:20px; display:none;"&gt;content2&lt;/div&gt;
&lt;div id="link3" style="height:100px; background:#000; color:#fff; margin-left:20px; display:none;"&gt;content3&lt;/div&gt;
&lt;div id="link4" style="height:100px; background:#000; color:#fff; margin-left:20px; display:none;"&gt;content4&lt;/div&gt;
</code></pre>

<p>jQuery</p>

<pre><code>$(document).ready(function(){
    $(".line").toggle(function(){
        $(this).animate({height:108},500);
        $("#link1").delay(500).slideDown();
        },function(){
            $(this).delay(500).animate({height:20},500);
            $("#link1").slideUp();
    }); 
});
</code></pre>

<p>​</p>
