How to programmatically open jquery accordion content panel
<p>I want to extend the default behavior of the jquery accordion and add a NEXT button inside the content panels. When the user clicks NEXT button inside the content panel, the accordion should open the next item.</p>

<p>I was able to locate the next item like this <code>$(this).parent().next()</code> but having trouble triggering the actual action.</p>

<pre><code>&lt;div id="accordion"&gt;
   &lt;h3&gt;&lt;a href="#"&gt;Item 1&lt;/a&gt;&lt;/h3&gt;
   &lt;div&gt;Item 1 content&lt;br /&gt;
      &lt;div onclick="$(this).parent().next().show();"&gt;NEXT&lt;/div&gt;
   &lt;/div&gt;
   &lt;h3&gt;&lt;a href="#"&gt;Item 2&lt;/a&gt;&lt;/h3&gt;
   &lt;div&gt;Item 2 content&lt;br /&gt;
   &lt;/div&gt;
&lt;/div&gt;
</code></pre>
