How can I add a space between words in jQuery?
<p>I have a jQuery function that returns a row from a database table. When it is displayed in a textbox, the words all run together. For example:  <code>Everyonepleasebecarefulwhenleavingthebuilding</code>. I would like to separate the words to read: <code>Every one please be careful when leaving the building</code>. This comes from user input, so the user clicks on whatever row he wishes to be displayed in the textbox. Each row contains different data. The code listed below is what triggers the event:</p>

<pre><code>$(document).ready(function() {
    $("table tr").click(function(){
        $("#txttread").val($(this).text());
    });
});

$(document).ready(function() {
    $('.pickme tr').not(':first').hover(
        function() { $(this).addClass('highlight'); },
        function() { $(this).removeClass('highlight'); }
    ).click( function() {
        $('.selected').removeClass('selected');
        $(this).addClass('selected').find('input').attr('checked','checked');
    });
});
</code></pre>
