Faster Javascript text replace
<p>Given the following javascript (jquery)</p>

<pre><code>        $("#username").keyup(function () {
            selected.username = $("#username").val();

            var url = selected.protocol +
                (selected.prepend == true ? selected.username : selected.url) + "/" +
                (selected.prepend == true ? selected.url : selected.username);

            $("#identifier").val(url);
        });
</code></pre>

<p>This code basically reads a textbox (username), and when it is typed into, it reconstructs the url that is being displayed in another textbox (identifier).</p>

<p>This works fine - there are no problems with its functionality. However it feels 'slow' and 'sluggish'. Is there a cleaner/faster way to accomplish this task?</p>

<p>Here is the HTML as requested.</p>

<pre><code>&lt;fieldset class="identifier delta"&gt;
    &lt;form action="/authenticate/openid" method="post" target="_top" &gt;
        &lt;input type="text" class="openid" id="identifier" name="identifier" readonly="readonly" /&gt;
        &lt;input type='text' id='username' name='username' class="left" style='display: none;'/&gt;
        &lt;input type="submit" value="Login" style="height: 32px; padding-top: 1px; margin-right: 0px;" class="login right" /&gt;
    &lt;/form&gt;
&lt;/fieldset&gt;
</code></pre>

<p>The identifier textbox just has a value set based on the hyperlink anchor of a button. </p>
