title: Jquery append html element to div after for loop, strange behaviour
body: <p>Here is the code:</p>
  
  <pre><code>$('#date').append(
      '&lt;select id="date"&gt;'+
      '&lt;option value="0"&gt;- - SELECT - -&lt;/option&gt;');
      for(var i in data){
      $('#date').append(
      '&lt;option value=""&gt;'+data[i]['date_time']+'&lt;/option&gt;');
      });
  $('#date').append('&lt;/select&gt;');
  </code></pre>
  
  <p><code>&lt;/select&gt;</code> is always added above for loop. If i replace it with just work select for example, it is appended at the end, where it should be. Why is this happening and how can i fix it?</p>