jquery custom accordion comments section
<p>I am building a comments section to a site and am having trouble with a custom accordion effect. </p>

<p>I know this is pretty simple but am having trouble getting it to work.</p>

<p>Here is the code:</p>

<pre><code>&lt;li class="main"&gt;
      &lt;span class="expand-collapse"&gt;&lt;/span&gt;

       &lt;ul class="responses"&gt;
           &lt;li&gt;
              &lt;p&gt;Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.&lt;/p&gt;
            &lt;/li&gt;
         &lt;/ul&gt;
&lt;/li&gt;

&lt;li class="main"&gt;
      &lt;span class="expand-collapse" href="#"&gt;&lt;/span&gt;

       &lt;ul class="responses"&gt;
           &lt;li&gt;
              &lt;p&gt;Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.&lt;/p&gt;
            &lt;/li&gt;
         &lt;/ul&gt;
&lt;/li&gt;

$('.expand-collapse').click(function(){
        $(this).toggleClass('minus');
        if( $(this).hasClass('minus') ){
            $(this).find('ul.responses').slideDown(500);
        }else{
            $(this).find('ul.responses').slideUp(500);
        }
    });
</code></pre>

<p><strong>UPDATED CODE:</strong></p>

<pre><code>$('.expand-collapse').click(function(){
        $(this).toggleClass('minus');

        $(this).parent().children('ul.responses').slideToggle(500);
]);
</code></pre>

<p>Any ideas how to get this working. I need to make sure that the accordion is contained so if I click the expand button only the closest thread expands.. not all of them..</p>

<p>Looks like I could be using slideToggle as well. </p>

<p>I have played with closest(), find(), next() all without success..
Any help?
Thanks </p>
