Submit form with jQuery on changed style
<p>OK, the title may be quite confusing. I'll try to explain. I have an element, that when clicked is calling a function with jQuery and the style of the element is changed from one to another:</p>

<pre><code>    $(".edit").click(function() {
        $(this).removeClass("edit").addClass("save");
    });

    $(".save").click(function() {
        // do form post
        $(this).removeClass("save").addClass("edit");
    });

 &lt;span class="edit"&gt;&lt;/span&gt;
</code></pre>

<p>When I click it the style does change. I checked with FireFinder for Firebug and indeed I see "save" class but when it is clicked, it does not appear that I trigger second function, but rather still the first one. Why? And how do I fix that?</p>
