Jquery use selected.text for value of focus input element
<p>I'm trying to "show" a div that contains a select when an input element has focus. When an item has been selected, I want to use that value for the input element and "hide" the div.</p>

<p>The div displays when I click in the input field and hides after I select an item, but the value does not show up in the input val() attribute.</p>

<pre><code>$(document).ready(function() {
  $('.QueryTD').focus(function(e) {
    $('.SelectDiv').show(); 
  });
  $('.QueryTD').blur(function(e) {
    $('.SelectDiv').hide();
    $('.QueryTD').val($('.SelectDiv:Selected').text);   
  });
});

&lt;tr align="center"&gt;&lt;td&gt;
&lt;cfinput name="Telemate_Daily_Query_emailTO#newQueryrecordnumber#" type="Text"   value="" size="40" maxsize="40"&gt;&lt;/td&gt;
&lt;td colspan="8"&gt;
&lt;cfinput name="Telemate_Daily_Query_Description#newQueryrecordnumber#" type="Text" value="" size="40" maxsize="40" class="QueryTD"&gt;
&lt;cfinput name="Telemate_Daily_Query_queryname#newQueryrecordnumber#" type="hidden" value="" size="40" maxsize="40"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;div class="SelectDiv" style="display:none;"&gt;
&lt;cfselect name="AvailableQueries" query="qGetTelemateAvailableQuerys" display="Description" value="id" /&gt;
&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
</code></pre>
