changing ID of link
<p>I'm having difficulty changing the ID of this link on the fly with jquery.  I can change the link text, but not the ID.  Any ideas?</p>

<pre><code>&lt;a href="#" id="follow-5"&gt;follow&lt;/a&gt;
</code></pre>

<p>and when you click the link, i'd like for it to look like:</p>

<pre><code>&lt;a href="#" id="following-5"&gt;following&lt;/a&gt;
</code></pre>

<p>here is my jquery code</p>

<pre><code>$("a[id^='follow']").live('click', function(e) {
    e.preventDefault();
    var aid = $(this).attr('id').substring(7);
    $.ajax({
        type: "POST", url: "/artist/", data: "command=becomeFan&amp;aid=" + aid,
        dataType: "html",
        success: function(data){
            $("#follow-" + aid).text("Following");
            $("#follow-" + aid).prev("a").attr("id","following-" + aid);
        }
    });
    return false;
});
</code></pre>
