title: jQuery find() on object created from a string
body: <p>I have a string with a value such as <code>&lt;select name="id"&gt;&lt;/select&gt;</code>.</p>
  
  <p>As I'd like to popupate that select, I thought of doing something like this to find the select, and popupate it afterwards:</p>
  
  <pre><code>$("&lt;select name="id"&gt;&lt;/select&gt;").find('select').html('&lt;option value="1"&gt;Test&lt;/option&gt;;
  </code></pre>
  
  <p>However, it seems that <code>$("&lt;select name="id"&gt;&lt;/select&gt;")</code> doesn't match anything.</p>
  
  <p>What am I doing wrong?</p>
  
  <hr>
  
  <p><strong>Edit</strong>: Okay, posting the whole code:</p>
  
  <p>I have a <code>&lt;script type="text/html"&gt;</code> element with a prototype form in it:</p>
  
  <pre><code>&lt;ul id="advanced_search_fields"&gt;&lt;/ul&gt;
  &lt;script type="text/html" id="prototype_fields"&gt;
      &lt;select name="search[__i__][field]" class="field_selector"&gt;
          &lt;option&gt;&lt;/option&gt;
          &lt;option data-type="choice" value="10"&gt;Bank&lt;/option&gt;
      &lt;/select&gt;
  &lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      var field_config = {"10":{"choices":["Choice 1","Choice 2","Choice 3","Other"]}};
  &lt;/script&gt;
  
  &lt;script type="text/html" id="prototype_choice"&gt;
      &lt;select name="search[__i__][value]"&gt;&lt;/select&gt;
  &lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      var srch_list = $('#advanced_search_fields');
      var add = function(){
          srch_list.append('&lt;li&gt;' + $('#prototype_fields').html() + '&lt;/li&gt;');
      };
      var change_field = function(){
          $(this).parent().find('span.field').remove();
          $(this).parent().data('id', $(this).val());
          change_field_to_type($(this).val(), $(this).find('option:selected').data('type'), $(this).parent());
      };
      var change_field_to_type = function(id, type, li){
          var prototype = $('#prototype_' + type).html();
          var formHtml = "";
  
          switch(type)
          {
              case "choice":
                  var select = $(prototype).filter('select');
  
                  $(field_config[id]['choices']).each(function(i, val){
                      select.append(
                          $('&lt;option&gt;&lt;/option&gt;')
                          .attr('value', val)
                          .text(val)
                      );
                  });
                  formHtml = prototype;
              break;
          }
          li.append('&lt;span class="field"&gt;' + formHtml + '&lt;/span&gt;');
      };
  
      $('.field_selector').live('change', change_field);
      add();
  &lt;/script&gt;
  
  &lt;input type="button" value="+" onclick="add();"&gt;
  </code></pre>