Old jquery click handlers still being active after ID change
<p>I know subject was not clear but I couldn't find a better sentence.</p>

<p>I am building an ajax form. Currently I can save form fields into db via clicking <strong>save button</strong> and getting values from db with <strong>edit button</strong>. I also change the #id of <strong>save button</strong> when <strong>edit button</strong> clicked. But the button still act as it is <strong>save button</strong> however I change it's #id.</p>

<p>Here is my button:</p>

<pre><code>&lt;a class="btn" id="save_post"&gt;Save Post&lt;/a&gt;
</code></pre>

<p>When I click on <strong>edit button</strong> I change form values and also change #id of Save Post button;</p>

<pre><code>$('#save_post').attr('id','edit_save_post');
</code></pre>

<p>After all, Firebug shows everything OK, #id changed. </p>

<pre><code>&lt;a class="btn" id="edit_save_post"&gt;Save Post&lt;/a&gt;
</code></pre>

<p>But when I click on button it doesn't run update db, it runs again save. How can I have browser forgot old #id?</p>

<p>Thanks,</p>
