title: jQuery mobile. Dynamically filling Select menu. Option doesn't display initially
body: <p>I am having issues with dynamically populating a select menu in jQuery mobile.</p>
  
  <p>When I append the options, the initial value isn't shown and I just get a blank line. The values are there and selectable when clicking on the menu, but it is just the initial view. It works fine when I hardcode the menu into the page. I would assume it is because I initially have an empty dropdown which is showing as it should and when appending, the view doesn't know to update so keeps showing an empty line. Is there anyway I can force the view to update after I have appended? I've tried <code>.trigger("create")</code> but this does nothing.</p>
  
  <p>Here is a screen showing what I mean. The "location" dropdown is the one I am having issue with and the "test" one is one I have hard coded to show what I am trying to achieve.</p>
  
  <p><img src="https://i.stack.imgur.com/XoYRD.png" alt="enter image description here"></p>
  
  <p>Here's the HTML:</p>
  
  <pre><code>&lt;label for="location" class="select"&gt;Location&lt;/label&gt;
  &lt;select name="location" id="location"&gt;&lt;/select&gt;
  &lt;label for="test" class="select"&gt;Test DD&lt;/label&gt;
  &lt;select name="test" id="test"&gt;
    &lt;option value="test1"&gt;Test 1&lt;/option&gt;
    &lt;option value="test2"&gt;Test 2&lt;/option&gt;
    &lt;option value="test3"&gt;Test 3&lt;/option&gt;
    &lt;option value="test4"&gt;Test 4&lt;/option&gt;
    &lt;option value="test5"&gt;Test 5&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>And here's the JS:</p>
  
  <pre><code>tx.executeSql('SELECT * FROM locations WHERE lDeleted != 1',
    [],
    function(tx,results){
      var len = results.rows.length;
      for (var i=0; i&lt;len; i++){
        $('#location').append('&lt;option value="'+results.rows.item(i).ID+
          '" class="dropDownBlk"&gt;'+results.rows.item(i).lTitle+'&lt;/option&gt;');
      }
      $('#location').append('&lt;option value="0"&gt;Add new location...&lt;/option&gt;')
    },
    errorCB
  );
  </code></pre>