jQuery duplicate select options in list
<p>I have the following situation</p>

<p><pre><code>&lt;div class="selectContainer">
&lt;select size="1" id="kind">
&lt;option value="one">one&lt;/option>
&lt;option value="two">two&lt;/option>
&lt;option value="three">three&lt;/option>
&lt;/select>
&lt;/div></p>

<p>&lt;div id="second">
&lt;ul id="test">&lt;/ul>&lt;/div></pre></code></p>

<p>I want jQuery to automatically duplicate the option values in a list, so i will get the following HTML</p>

<pre><code>&lt;div id="second">
&lt;ul id="test">
&lt;li id="one">one&lt;/li>
&lt;li id="two">two&lt;/li>
&lt;li id="three">three&lt;/li>
&lt;/ul>
&lt;/div>
</code></pre>

<p>I thought the following would work, but it doesn't. I gives me one list item with 'undefined' in it</p>

<pre><code> 
$(function(){
 $("#kind").each(function () {
  li = '&lt;li id="'+$(this).attr('value')+'">'+$(this).attr('text')+'&lt;/li>';
  $("#test").html(li);
 });
});</code></pre>
