Toggling classes?
<p>I have the following script which works fairly well:</p>

<pre><code>$(".btnMinimize").live('click', function(event) {
    event.preventDefault(); 

    $( this ).parents( ".portlet" ).find( ".portlet-sub-header" ).toggle();
    $( this ).parents( ".portlet" ).find( ".portlet-content" ).toggle();
    $( this ).parents( ".portlet" ).find( ".portlet-footer" ).toggle();
});
</code></pre>

<p>the <code>.btnMinimize</code> is within a div tag with the class <code>.portlet-header</code>.</p>

<p>When this button is clicked, how do I get it to toggle style sheet classes which would in-tern toggle the image of the button being clicked, so it should change from a minimize icon to a maximize icon.</p>

<p>Right now the button is assigned the class <code>.btnMinimize</code>, which should toggle to <code>.btnMaximize</code>, bearing in mind that the button state will be database generated, i.e. if the button for portlet 1 is minimize, and for portlet 2 is maximize, it should toggle appropriately.</p>

<p>I am not sure if this is the best way to go about doing this, so please feel free to suggest a better approach.</p>
