.append jquery, limit to one character per <span>
<p>I have these two functions:</p>

<pre><code>jQuery.fn.enterText = function(e){
if( $("#cursor").val() &amp;&amp; e.keyCode != 32  ){
    var character = $("#cursor").val();
    $("#cursor").val("");
    this.append("&lt;span class = 'text'&gt;"+character+"&lt;/span&gt;");
    $("#cursor").insertAfter(".text:last");
    $("#cursor").focus();

}
};

jQuery.fn.markCursor = function(e){
    $(this).focus();
   $(this).keyup(function(e) {
  $("#cursor-start").enterText(e);

});

};
</code></pre>

<p>What my problem is that if I text is entered rapidly, some  elements will have more than one character, for example (abc). I wanted to know how to limit to one character in an efficient manner, I thought of using an array, but would that not be too efficient?</p>
