jQuery: clone input field without losing keyCode functionality
<p>Been trying to build jQuery support into a text input where pressing return duplicates the div container into the space right below it. What I can't figure out is how to focus on the input field inside the newly-created div automatically, and, even more frustrating, why that new input field loses the functionality to duplicate. In other words, pressing return only duplicates if you are in the originally-created input field.</p>

<pre><code>$(document).ready(function(){
    textboxes = $("input.data-entry");
        if ($.browser.mozilla) {
        $(textboxes).keypress (checkForAction);
        } 
        else {
        $(textboxes).keydown (checkForAction);
        }
 });

function checkForAction (event) {
    if (event.keyCode == 13) {
        $(this).clone().val('').appendTo('#form_container');
        return false;
}
}
</code></pre>

<p>HTML</p>

<pre><code>&lt;div id="form_container"&gt;   
        &lt;input name="firstrow" type="text" class="data-entry"&gt;
&lt;/div&gt;
</code></pre>
