Multiple control instances using jQuery and ASP.NET controls
<pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function() {
        $('#pHeader').click(function() {
            $('#pBody').slideToggle('fast');
        });
    });
 &lt;/script&gt;

&lt;asp:Panel ID="pHeader" runat="server" CssClass="cpHeader"&gt;
    &lt;asp:Label ID="lblText" runat="server" Text="Header" /&gt;
&lt;/asp:Panel&gt;

&lt;asp:Panel ID="pBody" runat="server" CssClass="cpBody"&gt;
    Lorem ipsum dolor sit amet, consectetur adipisicing elit,
    sed do eiusmod tempor incididunt ut labore et dolore magna
    aliqua. Ut enim ad minim veniam, quis nostrud exercitation
    ullamco laboris nisi ut aliquip ex ea commodo consequat.
    Duis aute irure dolor in reprehenderit in voluptate velit
    esse cillum dolore eu fugiat nulla pariatur
&lt;/asp:Panel&gt;
</code></pre>

<p>As you can see from the above I am trying to achieve a collapsible panel. However the above will only work once. How can I make this accessible to multiple controls, i.e. if I have 10 panels on a page?</p>

<p>Thanks guys! </p>
