Only open accordion once, but still call onclick each time, when button clicked in jquery
<p>I am using jquery accordion animation: </p>

<pre><code>$('.accordion').click(function() {
       $(this).next().toggle("fold", 1000);
       return false;
  }).next().hide();
</code></pre>

<p>along with a button for expanding the div below: </p>

<pre><code>&lt;button class="accordion" onclick="my_method()"&gt;EXPAND&lt;/button&gt;
    &lt;div  class="panel"&gt;
        ...contents to expand here
    &lt;/div&gt;
</code></pre>

<p>This works great. But I only want to allow the accordion to open once (unless page refreshed obviously), although the onclick event should call the method every time the button is clicked. </p>