title: jquery mobile: drop down options populated through javascript is not being shown as a selectable drop-down its plainly rendering.PFA
body: <p>this is how its rendering.
  <img src="https://i.stack.imgur.com/qDuqk.png" alt="enter image description here">here is what i used</p>
  
  <p>this is how i need</p>
  
  <p><img src="https://i.stack.imgur.com/FlAVv.png" alt="enter image description here"></p>
  
  <p>on document ready im calling populate function and passing class name 'fromTime' to it.its just rendering it plainly not the options in the select box.</p>
  
  <pre><code>function populate(selector) {
      var select = $(selector);
      var selectBox = $("&lt;select&gt;&lt;/select&gt;");
      var hours, minutes, ampm ;
      for(var k = 700; k &lt;= 2300; k += 100){
          var i=0;
          for(var j=0;j&lt;=45;j+=15){
              i=k+j
              hours = Math.floor(i / 100);
              minutes = i % 100;
  
              if(minutes&gt;10){
                  minutes=minutes+"";
              }else{
                  minutes=0+""+minutes;
              }
              ampm = hours % 24 &lt; 12 ? 'AM' : 'PM';
              hours = hours % 12;
              if (hours === 0){
                  hours = 12;
              }
              var valueString=hours + ':' + minutes + ' ' + ampm;
              select.append($('&lt;option&gt;&lt;/option&gt;')
                      .attr('value', i)
                      .text(valueString));
  
          }
      }
  
  }
  </code></pre>
  
  <p>here is html code</p>
  
  <pre><code>&lt;div class="ui-field-contain"&gt;
                             &lt;label for="select-custom-20"&gt;Long list:&lt;/label&gt;
                              &lt;select name="select-custom-20" class="fromTime" id="select-custom-20" data-native-menu="false"&gt;
                                 &lt;option value=''&gt;Start Time&lt;/option&gt; 
                                                                                      &lt;/select&gt;
                          &lt;/div&gt;
  </code></pre>