How can I change the text of a <span> element?
<p>I have a toggle button that I'm adding to an iFrame:</p>

<pre><code>&lt;script&gt;
    $('#list div').each(function(){
        $(this).append('&lt;span class="togglebutton"&gt;Maximize&lt;/span&gt;');   
    });

    $("span.togglebutton").click(function() {
        $(this).closest("li").children("div").toggleClass("maximized");
    });
&lt;/script&gt;
</code></pre>

<p>How can I change the toggle between the text Maximize/Minimize when the toggleClass is maximized?</p>
